From 0ffd6856e172020e824ed61e7a6d00779c5999af Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Sat, 5 Feb 2022 16:01:37 +0000 Subject: Make flake8 happy --- lorry | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lorry') diff --git a/lorry b/lorry index a6312a5..935f962 100755 --- a/lorry +++ b/lorry @@ -61,7 +61,7 @@ def quote_url(url): """ valid_chars = string.digits + string.ascii_letters + "%_" - transl = lambda x: x if x in valid_chars else "_" + transl = lambda x: x if x in valid_chars else "_" # noqa E731 return "".join([transl(x) for x in url]) @@ -374,7 +374,7 @@ class Lorry(cliapp.Application): repositoryformatversion = 0 filemode = true bare = true -""" +""" # noqa: 374 ) for entry in [ "HEAD", @@ -451,7 +451,7 @@ class Lorry(cliapp.Application): self.write_update_count(temp_repo, next_update_count) active_repo = temp_repo - except: + except: # noqa: E722 if active_repo is not None: os.rename(temp_repo, post_fail_backup_dir) self.output.write( @@ -946,7 +946,7 @@ class Lorry(cliapp.Application): pullurl = "%s/%s.git" % (self.settings["mirror-base-url-push"], project_name) try: self.run_program(["git", "fetch", pullurl, raw_file_refspecs], cwd=gitdir) - except: + except Exception: # TODO: Be more specific about which exceptions are fine pass @@ -1106,7 +1106,7 @@ class Lorry(cliapp.Application): self.progress( "%s: pruned %d unreachable commit(s)" % (marks_name, n_pruned) ) - except: + except: # noqa: E722 # On failure, delete temporary file os.unlink(marks_temp_name) raise -- cgit v1.2.1