Exit cleanly if no command is provided.
This commit is contained in:
parent
74db8e5fe6
commit
a9c6967e4f
|
@ -971,6 +971,8 @@ See '""" + __progname__ + """ <command> -h' for help on individual commands.""",
|
|||
sp = parser.add_subparsers(dest="command", help="command")
|
||||
for command in cmds:
|
||||
command.setup(sp)
|
||||
if not args:
|
||||
parser.error("Command is required.")
|
||||
args = parser.parse_args(args)
|
||||
args.action(args)
|
||||
|
||||
|
|
Loading…
Reference in New Issue