diff --git a/main.py b/main.py index d2a303ca3..5f6bd81f2 100755 --- a/main.py +++ b/main.py @@ -364,7 +364,7 @@ class _BasicAuthHandler(urllib.request.HTTPBasicAuthHandler): req.add_header = _add_header return urllib.request.AbstractBasicAuthHandler.http_error_auth_reqed( self, authreq, host, req, headers) - except: + except Exception: reset = getattr(self, 'reset_retry_count', None) if reset is not None: reset() @@ -389,7 +389,7 @@ class _DigestAuthHandler(urllib.request.HTTPDigestAuthHandler): req.add_header = _add_header return urllib.request.AbstractDigestAuthHandler.http_error_auth_reqed( self, auth_header, host, req, headers) - except: + except Exception: reset = getattr(self, 'reset_retry_count', None) if reset is not None: reset() @@ -432,7 +432,7 @@ class _KerberosAuthHandler(urllib.request.BaseHandler): return response except kerberos.GSSError: return None - except: + except Exception: self.reset_retry_count() raise finally: diff --git a/project.py b/project.py index 372421cf3..016f4a535 100644 --- a/project.py +++ b/project.py @@ -2619,7 +2619,7 @@ class Project(object): (self.worktree)): platform_utils.rmtree(platform_utils.realpath(self.worktree)) return self._InitGitDir(mirror_git=mirror_git, force_sync=False) - except: + except Exception: raise e raise e @@ -2864,7 +2864,7 @@ class Project(object): try: platform_utils.rmtree(dotgit) return self._InitWorkTree(force_sync=False, submodules=submodules) - except: + except Exception: raise e raise e diff --git a/subcmds/sync.py b/subcmds/sync.py index c433ce6f7..cc058af64 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -603,7 +603,7 @@ later is required to fix a server side protocol bug. bare_git.gc('--auto', config=config) except GitError: err_event.set() - except: + except Exception: err_event.set() raise finally: