From 4a478edb443864561089b2699c9e65c85fc5e036 Mon Sep 17 00:00:00 2001 From: Raman Tenneti Date: Wed, 17 Nov 2021 18:38:24 -0800 Subject: init, sync: fixed flake8 warnings. 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 Tested-by: Raman Tenneti --- subcmds/sync.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'subcmds/sync.py') 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. else: pm.update(inc=0, msg='warming up') chunksize = 4 - with multiprocessing.Pool( - jobs, initializer=self._FetchInitChild, initargs=(ssh_proxy,)) as pool: + with multiprocessing.Pool(jobs, initializer=self._FetchInitChild, + initargs=(ssh_proxy,)) as pool: results = pool.imap_unordered( functools.partial(self._FetchProjectList, opt), projects_list, @@ -767,7 +767,7 @@ later is required to fix a server side protocol bug. with open(copylinkfile_path, 'rb') as fp: try: old_copylinkfile_paths = json.load(fp) - except: + except Exception: print('error: %s is not a json formatted file.' % copylinkfile_path, file=sys.stderr) platform_utils.remove(copylinkfile_path) @@ -1131,7 +1131,7 @@ def _PostRepoUpgrade(manifest, quiet=False): target = os.path.join('repo', 'docs', 'internal-fs-layout.md') try: platform_utils.symlink(target, link) - except: + except Exception: pass wrapper = Wrapper() -- cgit v1.2.3-54-g00ecf