diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-10-28 12:15:32 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-10-28 12:15:32 +0100 |
commit | 7e340bee4b2eb76610a886f73354718c73ffdc9e (patch) | |
tree | 670cffcff6c75b16736c73a866a1f4b68326e6c2 /pykolab/cli/__init__.py | |
parent | 7790ecb12466e2022061ca5cd0b0565975349681 (diff) | |
download | pykolab-7e340bee4b2eb76610a886f73354718c73ffdc9e.tar.gz |
Correct commands parsing
Diffstat (limited to 'pykolab/cli/__init__.py')
-rw-r--r-- | pykolab/cli/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pykolab/cli/__init__.py b/pykolab/cli/__init__.py index 98075c9..a115271 100644 --- a/pykolab/cli/__init__.py +++ b/pykolab/cli/__init__.py @@ -48,10 +48,10 @@ class Cli(object): to_execute = [] - arg_num = 1 + arg_num = 0 for arg in sys.argv[1:]: arg_num += 1 - if not arg.startswith('-') and len(sys.argv) > arg_num: + if not arg.startswith('-') and len(sys.argv) >= arg_num: if commands.commands.has_key(sys.argv[arg_num].replace('-','_')): to_execute.append(sys.argv[arg_num].replace('-','_')) |