formatting

This commit is contained in:
Divyansh Singh 2023-06-07 01:47:16 +05:30
parent 2d761dd86b
commit dc56fd33a0
2 changed files with 9 additions and 8 deletions

View file

@ -75,12 +75,7 @@ def parse_subparser_arguments(unparsed_arguments, subparsers):
if item in subparsers: if item in subparsers:
remaining_arguments.remove(item) remaining_arguments.remove(item)
try: arguments[canonical_name] = None if canonical_name in subcommand_parsers_mapping else parsed
arguments[canonical_name] = (
None if canonical_name in subcommand_parsers_mapping else parsed
)
except UnboundLocalError:
pass
for argument in arguments: for argument in arguments:
if not arguments[argument]: if not arguments[argument]:
@ -153,7 +148,7 @@ class Extend_action(Action):
items = getattr(namespace, self.dest, None) items = getattr(namespace, self.dest, None)
if items: if items:
items.extend(values) items.extend(values) # pragma: no cover
else: else:
setattr(namespace, self.dest, list(values)) setattr(namespace, self.dest, list(values))

View file

@ -637,7 +637,13 @@ def collect_configuration_run_summary_logs(configs, arguments):
msg='Bootstrap successful', 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) yield from log_error_records('Error running bootstrap', error)
return return