mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-22 14:11:27 +00:00
flake8: fix F841
This commit is contained in:
parent
fc4a7bc0c9
commit
10cdadb2f8
5 changed files with 7 additions and 7 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -758,7 +758,7 @@ class ChunksIndexError(Error):
|
|||
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 @@ def valid_item(obj):
|
|||
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:
|
||||
|
|
|
@ -36,7 +36,7 @@ def commit_local_nonce_reservation(self, next_unreserved, start_nonce):
|
|||
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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue