diff options
author | Raman Tenneti <rtenneti@google.com> | 2021-11-17 18:38:24 -0800 |
---|---|---|
committer | Raman Tenneti <rtenneti@google.com> | 2021-11-18 16:22:40 +0000 |
commit | 4a478edb443864561089b2699c9e65c85fc5e036 (patch) | |
tree | e816a38fb6a6a1275558163940923a4e9acd859e /subcmds/sync.py | |
parent | 6bd89aa6579cb5a108554c392d7d87a6ce978aa8 (diff) | |
download | git-repo-4a478edb443864561089b2699c9e65c85fc5e036.tar.gz |
init, sync: fixed flake8 warnings.v2.18
Tested:
+ run_tests
+ flake8 subcmds/init.py
+ flake8 subcmds/sync.py
Change-Id: Ie337481d8a210bfc49b0745f75c05a308a0e74d3
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/324155
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Raman Tenneti <rtenneti@google.com>
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index ee7e4a80..4898430b 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -448,8 +448,8 @@ later is required to fix a server side protocol bug. | |||
448 | else: | 448 | else: |
449 | pm.update(inc=0, msg='warming up') | 449 | pm.update(inc=0, msg='warming up') |
450 | chunksize = 4 | 450 | chunksize = 4 |
451 | with multiprocessing.Pool( | 451 | with multiprocessing.Pool(jobs, initializer=self._FetchInitChild, |
452 | jobs, initializer=self._FetchInitChild, initargs=(ssh_proxy,)) as pool: | 452 | initargs=(ssh_proxy,)) as pool: |
453 | results = pool.imap_unordered( | 453 | results = pool.imap_unordered( |
454 | functools.partial(self._FetchProjectList, opt), | 454 | functools.partial(self._FetchProjectList, opt), |
455 | projects_list, | 455 | projects_list, |
@@ -767,7 +767,7 @@ later is required to fix a server side protocol bug. | |||
767 | with open(copylinkfile_path, 'rb') as fp: | 767 | with open(copylinkfile_path, 'rb') as fp: |
768 | try: | 768 | try: |
769 | old_copylinkfile_paths = json.load(fp) | 769 | old_copylinkfile_paths = json.load(fp) |
770 | except: | 770 | except Exception: |
771 | print('error: %s is not a json formatted file.' % | 771 | print('error: %s is not a json formatted file.' % |
772 | copylinkfile_path, file=sys.stderr) | 772 | copylinkfile_path, file=sys.stderr) |
773 | platform_utils.remove(copylinkfile_path) | 773 | platform_utils.remove(copylinkfile_path) |
@@ -1131,7 +1131,7 @@ def _PostRepoUpgrade(manifest, quiet=False): | |||
1131 | target = os.path.join('repo', 'docs', 'internal-fs-layout.md') | 1131 | target = os.path.join('repo', 'docs', 'internal-fs-layout.md') |
1132 | try: | 1132 | try: |
1133 | platform_utils.symlink(target, link) | 1133 | platform_utils.symlink(target, link) |
1134 | except: | 1134 | except Exception: |
1135 | pass | 1135 | pass |
1136 | 1136 | ||
1137 | wrapper = Wrapper() | 1137 | wrapper = Wrapper() |