Skip to content

Commit

Permalink
Do not show a stacktrace if we fail because we got too many args.
Browse files Browse the repository at this point in the history
The seed command expects only one positional arguments. If we got more
than one, we should exit with a clean error message, instead of crashing
with an uncaught exception and the associated stacktrace.
  • Loading branch information
gouttegd committed Aug 23, 2024
1 parent 2b059c4 commit d38aa2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion odk/odk.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ def seed(config, clean, outdir, templatedir, dependencies, title, user, source,
mg = Generator()
if len(repo) > 0:
if len(repo) > 1:
raise Exception('max one repo; current={}'.format(repo))
raise click.ClickException('max one repo; current={}'.format(repo))
repo = repo[0]
else:
repo = "noname"
Expand Down

0 comments on commit d38aa2d

Please sign in to comment.