From: W. Trevor King Date: Thu, 13 May 2010 10:55:29 +0000 (-0400) Subject: Fix bug in hooke.ui.commandline.DoCommand._check_argument_length() max_arg calculation. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fcb387b9089305edc2000cd260332c0de055776d;p=hooke.git Fix bug in hooke.ui.commandline.DoCommand._check_argument_length() max_arg calculation. --- diff --git a/hooke/ui/commandline.py b/hooke/ui/commandline.py index 6767cb4..57263db 100644 --- a/hooke/ui/commandline.py +++ b/hooke/ui/commandline.py @@ -127,7 +127,7 @@ class DoCommand (CommandMethod): If not, raise optparse.OptParseError(). """ min_args = 0 - max_args = -1 + max_args = 0 for argument in self.parser.command_args: if argument.optional == False and argument.count > 0: min_args += argument.count diff --git a/test/data/test.hkp b/test/data/test.hkp index 7a6c881..b104aec 100644 --- a/test/data/test.hkp +++ b/test/data/test.hkp @@ -1,5 +1,4 @@ - - - + +