From 919ba2b4a570913f0b9aca68201f09c6255bc63c Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 26 Jun 2014 20:54:45 +0200 Subject: [PATCH] Print error on missing command. --- patool | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/patool b/patool index 3707787..255211e 100755 --- a/patool +++ b/patool @@ -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