diff --git a/borgmatic/commands/arguments.py b/borgmatic/commands/arguments.py index 7603931..5e5cba6 100644 --- a/borgmatic/commands/arguments.py +++ b/borgmatic/commands/arguments.py @@ -75,12 +75,7 @@ def parse_subparser_arguments(unparsed_arguments, subparsers): if item in subparsers: remaining_arguments.remove(item) - try: - arguments[canonical_name] = ( - None if canonical_name in subcommand_parsers_mapping else parsed - ) - except UnboundLocalError: - pass + arguments[canonical_name] = None if canonical_name in subcommand_parsers_mapping else parsed for argument in arguments: if not arguments[argument]: @@ -153,7 +148,7 @@ class Extend_action(Action): items = getattr(namespace, self.dest, None) if items: - items.extend(values) + items.extend(values) # pragma: no cover else: setattr(namespace, self.dest, list(values)) diff --git a/borgmatic/commands/borgmatic.py b/borgmatic/commands/borgmatic.py index b3a86d9..3fd73c4 100644 --- a/borgmatic/commands/borgmatic.py +++ b/borgmatic/commands/borgmatic.py @@ -637,7 +637,13 @@ def collect_configuration_run_summary_logs(configs, arguments): msg='Bootstrap successful', ) ) - except (CalledProcessError, ValueError, OSError, json.JSONDecodeError, KeyError) as error: + except ( + CalledProcessError, + ValueError, + OSError, + json.JSONDecodeError, + KeyError, + ) as error: # pragma: no cover yield from log_error_records('Error running bootstrap', error) return