]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2058] hammer.py: indentation (minor change)
authorAndrei Pavel <andrei@isc.org>
Fri, 27 Aug 2021 15:54:59 +0000 (18:54 +0300)
committerAndrei Pavel <andrei@isc.org>
Thu, 2 Sep 2021 12:02:12 +0000 (15:02 +0300)
hammer.py

index 78621346c2f412c09c657b44344b3495bcc28fb3..bec3d2e0e31804ffd49500cb248458c7c6c94aa1 100755 (executable)
--- a/hammer.py
+++ b/hammer.py
@@ -2725,40 +2725,42 @@ def prepare_system_cmd(args):
                               args.dry_run, args.check_times, args.clean_start,
                               ccache_dir)
 
+
 def upload_to_repo(args, pkgs_dir):
-   # NOTE: note the differences (if any) in system/revision vs args.system/revision
-   system, revision = get_system_revision()
-   repo_url = _get_full_repo_url(args.repository_url, system, revision, args.pkg_version)
-   assert repo_url is not None
-   upload_cmd = 'curl -v --netrc -f'
-   log.info('args.system %s, system = %s', args.system, system)
-
-   file_ext = ''
-   if system in ['ubuntu', 'debian']:
-       upload_cmd += ' -X POST -H "Content-Type: multipart/form-data" --data-binary "@%s" '
-       file_ext = '.deb'
-
-   elif system in ['fedora', 'centos', 'rhel']:
-       upload_cmd += ' --upload-file %s '
-       file_ext = '.rpm'
-
-   elif system == 'alpine':
-       upload_cmd += ' --upload-file %s '
-       file_ext = ''
-       repo_url = urljoin(repo_url, '%s/v%s/x86_64/' % (args.pkg_isc_version, revision))
-
-   upload_cmd += ' ' + repo_url
-
-   for fn in os.listdir(pkgs_dir):
-       log.info("debug: fn = %s", fn)
-       if file_ext and not fn.endswith(file_ext):
-           log.info('File extension "%s" is not supported by upload_to_repo function', file_ext)
-           continue
-       fp = os.path.join(pkgs_dir, fn)
-       log.info("upload cmd: %s", upload_cmd)
-       log.info("fp: %s", fp)
-       cmd = upload_cmd % fp
-       execute(cmd)
+    # NOTE: note the differences (if any) in system/revision vs args.system/revision
+    system, revision = get_system_revision()
+    repo_url = _get_full_repo_url(args.repository_url, system, revision, args.pkg_version)
+    assert repo_url is not None
+    upload_cmd = 'curl -v --netrc -f'
+    log.info('args.system %s, system = %s', args.system, system)
+
+    file_ext = ''
+    if system in ['ubuntu', 'debian']:
+        upload_cmd += ' -X POST -H "Content-Type: multipart/form-data" --data-binary "@%s" '
+        file_ext = '.deb'
+
+    elif system in ['fedora', 'centos', 'rhel']:
+        upload_cmd += ' --upload-file %s '
+        file_ext = '.rpm'
+
+    elif system == 'alpine':
+        upload_cmd += ' --upload-file %s '
+        file_ext = ''
+        repo_url = urljoin(repo_url, '%s/v%s/x86_64/' % (args.pkg_isc_version, revision))
+
+    upload_cmd += ' ' + repo_url
+
+    for fn in os.listdir(pkgs_dir):
+        log.info("debug: fn = %s", fn)
+        if file_ext and not fn.endswith(file_ext):
+            log.info('File extension "%s" is not supported by upload_to_repo function', file_ext)
+            continue
+        fp = os.path.join(pkgs_dir, fn)
+        log.info("upload cmd: %s", upload_cmd)
+        log.info("fp: %s", fp)
+        cmd = upload_cmd % fp
+        execute(cmd)
+
 
 def build_cmd(args):
     """Check command args and run the build command."""