mirror of
https://github.com/a2-4am/wozardry.git
synced 2024-12-12 17:29:14 +00:00
Merge pull request #1 from KrisKennaway/usage
Exit cleanly if no command is provided.
This commit is contained in:
commit
45265911ae
@ -971,6 +971,8 @@ See '""" + __progname__ + """ <command> -h' for help on individual commands.""",
|
|||||||
sp = parser.add_subparsers(dest="command", help="command")
|
sp = parser.add_subparsers(dest="command", help="command")
|
||||||
for command in cmds:
|
for command in cmds:
|
||||||
command.setup(sp)
|
command.setup(sp)
|
||||||
|
if not args:
|
||||||
|
parser.error("Command is required.")
|
||||||
args = parser.parse_args(args)
|
args = parser.parse_args(args)
|
||||||
args.action(args)
|
args.action(args)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user