Print error on missing command.

This commit is contained in:
Bastian Kleineidam 2014-06-26 20:54:45 +02:00
parent 16361ba5f4
commit 919ba2b4a5
1 changed files with 4 additions and 1 deletions

5
patool
View File

@ -188,8 +188,11 @@ def main():
try:
argparser = create_argparser()
args = argparser.parse_args()
if args.command is None:
# Python 3.3.1 under linux allows an empty command somehow
argparser.error("too few arguments")
# run subcommand function
return globals()["run_%s" % args.command](args)
res = globals()["run_%s" % args.command](args)
except KeyboardInterrupt:
log_error("aborted")
res = 1