Skip to content

Commit

Permalink
Display the usage if no subcommand is selected.
Browse files Browse the repository at this point in the history
  • Loading branch information
ctheune committed Apr 15, 2020
1 parent 8e0e2de commit 297349b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/batou/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ def main():

# Pass over to function
func_args = dict(args._get_kwargs())
if not 'func' in func_args:
parser.print_usage()
sys.exit(1)

del func_args['func']
del func_args['debug']
args.func(**func_args)

0 comments on commit 297349b

Please sign in to comment.