From fcb387b9089305edc2000cd260332c0de055776d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 13 May 2010 06:55:29 -0400 Subject: [PATCH] Fix bug in hooke.ui.commandline.DoCommand._check_argument_length() max_arg calculation. --- hooke/ui/commandline.py | 2 +- test/data/test.hkp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) 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 @@ - - - + + -- 2.26.2