mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +03:00
ukify: Move summary option handling out of finalize_options
This way finalize_options will not call sys.exit by itself.
This commit is contained in:
parent
e95193504b
commit
3d2144a214
@ -1919,11 +1919,6 @@ def finalize_options(opts: argparse.Namespace) -> None:
|
|||||||
# A convenience dictionary to make it easy to look up sections
|
# A convenience dictionary to make it easy to look up sections
|
||||||
opts.sections_by_name = {s.name: s for s in opts.sections}
|
opts.sections_by_name = {s.name: s for s in opts.sections}
|
||||||
|
|
||||||
if opts.summary:
|
|
||||||
# TODO: replace pprint() with some fancy formatting.
|
|
||||||
pprint.pprint(vars(opts))
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
|
|
||||||
def parse_args(args: Optional[list[str]] = None) -> argparse.Namespace:
|
def parse_args(args: Optional[list[str]] = None) -> argparse.Namespace:
|
||||||
opts = create_parser().parse_args(args)
|
opts = create_parser().parse_args(args)
|
||||||
@ -1934,7 +1929,10 @@ def parse_args(args: Optional[list[str]] = None) -> argparse.Namespace:
|
|||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
opts = parse_args()
|
opts = parse_args()
|
||||||
if opts.verb == 'build':
|
if opts.summary:
|
||||||
|
# TODO: replace pprint() with some fancy formatting.
|
||||||
|
pprint.pprint(vars(opts))
|
||||||
|
elif opts.verb == 'build':
|
||||||
check_inputs(opts)
|
check_inputs(opts)
|
||||||
make_uki(opts)
|
make_uki(opts)
|
||||||
elif opts.verb == 'genkey':
|
elif opts.verb == 'genkey':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user