1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-27 02:08:54 +00:00

remove now unused argument()

This commit is contained in:
Thomas Waldmann 2022-08-11 06:30:16 +02:00
parent 8562940b0d
commit 252b145833

View file

@ -27,15 +27,6 @@
logger = create_logger(__name__) logger = create_logger(__name__)
def argument(args, str_or_bool):
"""If bool is passed, return it. If str is passed, retrieve named attribute from args."""
if isinstance(str_or_bool, str):
return getattr(args, str_or_bool)
if isinstance(str_or_bool, (list, tuple)):
return any(getattr(args, item) for item in str_or_bool)
return str_or_bool
def get_repository(location, *, create, exclusive, lock_wait, lock, append_only, make_parent_dirs, storage_quota, args): def get_repository(location, *, create, exclusive, lock_wait, lock, append_only, make_parent_dirs, storage_quota, args):
if location.proto == "ssh": if location.proto == "ssh":
repository = RemoteRepository( repository = RemoteRepository(