flake8: fix F841

This commit is contained in:
Thomas Waldmann 2018-10-29 11:54:24 +01:00
parent fc4a7bc0c9
commit 10cdadb2f8
5 changed files with 7 additions and 7 deletions

View File

@ -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:
if verbose:
print("%s errored." % filename)

View File

@ -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

View File

@ -758,7 +758,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:
@ -1627,7 +1627,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 msgpack.UnpackException as err:
except msgpack.UnpackException:
report('Unpacker crashed while unpacking item metadata, trying to resync...', chunk_id, i)
unpacker.resync()
except Exception:

View File

@ -36,7 +36,7 @@ class NonceManager:
def get_repo_free_nonce(self):
try:
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

View File

@ -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():
new_stats = os.stat(filepath, follow_symlinks=False)
if new_stats.st_birthtime == birthtime and new_stats.st_mtime == mtime and new_stats.st_atime == atime:
return True
except OSError as err:
except OSError:
pass
return False