Skip to content

Commit

Permalink
Merge pull request #617 from minrk/no-help-error
Browse files Browse the repository at this point in the history
do not print help on error
  • Loading branch information
minrk committed Sep 7, 2020
2 parents 6762b82 + 05164d6 commit 77c407b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions traitlets/config/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def inner(app, *args, **kwargs):
try:
return method(app, *args, **kwargs)
except (TraitError, ArgumentError) as e:
app.print_help()
app.log.fatal("Bad config encountered during initialization: %s", e)
app.log.debug("Config at the time: %s", app.config)
app.exit(1)
Expand Down Expand Up @@ -700,8 +699,8 @@ def parse_command_line(self, argv=None):
try:
self.cli_config = deepcopy(loader.load_config())
except SystemExit:
# print help output on error
self.print_help()
# traitlets 5: no longer print help output on error
# help output is huge, and comes after the error
raise
self.update_config(self.cli_config)
# store unparsed args in extra_args
Expand Down

0 comments on commit 77c407b

Please sign in to comment.