(cherry picked from commit 10cdadb2f8b33cd6060d9e071fe652f743c7568a)
@@ -41,7 +41,7 @@ def main():
overall_versions.add(requires_glibc)
if verbose:
print("%s %s" % (filename, format_version(requires_glibc)))
- except subprocess.CalledProcessError as e:
+ except subprocess.CalledProcessError:
print("%s errored." % filename)
@@ -6,7 +6,7 @@ python_files = testsuite/*.py
# with existing code. if you want to change them, you should first fix all
# flake8 failures that appear with your change.
ignore = E122,E123,E125,E126,E127,E128,E226,E402,E722,E731,E741,F401,F405,F811,
- W504,W605,F841
+ W504,W605
# line length long term target: 120
max-line-length = 255
exclude = build,dist,.git,.idea,.cache,.tox,docs/conf.py
@@ -773,7 +773,7 @@ Utilization of max. archive size: {csize_max:.0%}
def fetch_async_response(wait=True):
try:
return self.repository.async_response(wait=wait)
- except Repository.ObjectNotFound as e:
+ except Repository.ObjectNotFound:
nonlocal error
# object not in repo - strange, but we wanted to delete it anyway.
if forced == 0:
@@ -1523,7 +1523,7 @@ class ArchiveChecker:
yield Item(internal_dict=item)
else:
report('Did not get expected metadata dict when unpacking item metadata (%s)' % reason, chunk_id, i)
- except RobustUnpacker.UnpackerCrashed as err:
+ except RobustUnpacker.UnpackerCrashed:
report('Unpacker crashed while unpacking item metadata, trying to resync...', chunk_id, i)
unpacker.resync()
except Exception:
@@ -37,7 +37,7 @@ class NonceManager:
def get_repo_free_nonce(self):
return self.repository.get_free_nonce()
- except InvalidRPCMethod as error:
+ except InvalidRPCMethod:
# old server version, suppress further calls
sys.stderr.write("Please upgrade to borg version 1.1+ on the server for safer AES-CTR nonce handling.\n")
self.get_repo_free_nonce = lambda: None
@@ -111,7 +111,7 @@ def is_utime_fully_supported():
new_stats = os.stat(filepath, follow_symlinks=False)
if new_stats.st_atime == 1000 and new_stats.st_mtime == 2000:
return True
- except OSError as err:
+ except OSError:
pass
return False
@@ -133,7 +133,7 @@ def is_birthtime_fully_supported():
if new_stats.st_birthtime == birthtime and new_stats.st_mtime == mtime and new_stats.st_atime == atime: