Skip to content

Commit

Permalink
Show help message if recursion limit reached. Closes #328
Browse files Browse the repository at this point in the history
Ideally would contain a link to the docs, but the "stable" docs haven't been updated yet.
  • Loading branch information
jameshadfield committed Jul 25, 2019
1 parent eb1abe2 commit 98eb94e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion augur/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ def make_parser():

def run(argv):
args = make_parser().parse_args(argv)
return args.__command__.run(args)
try:
return args.__command__.run(args)
except RecursionError:
print("FATAL: Maximum recursion depth reached. You can set the env variable AUGUR_RECURSION_LIMIT to adjust this (current limit: {})".format(sys.getrecursionlimit()))
sys.exit(2)


def add_default_command(parser):
Expand Down

0 comments on commit 98eb94e

Please sign in to comment.