Skip to content

Commit

Permalink
Improve subparser help display and print errors on stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Apr 15, 2019
1 parent 441fb31 commit 16f6e04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dunamai/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def build_parser(spec: Mapping, parser: argparse.ArgumentParser = None) -> argpa
subparser = subparsers.add_parser(
name,
description=sub_spec.get("description"),
help=sub_spec.get("description"),
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
build_parser(sub_spec, subparser)
Expand Down Expand Up @@ -180,5 +181,5 @@ def main() -> None:
tag_dir,
)
except Exception as e:
print(e)
print(e, file=sys.stderr)
sys.exit(1)

0 comments on commit 16f6e04

Please sign in to comment.