summaryrefslogtreecommitdiffstats
path: root/pykolab/cli/__init__.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-12 12:10:26 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-12 12:10:26 +0000
commit7b0938388980cfbfe4f1c4b43baa1eb1ad7b0ac5 (patch)
tree0577ba2b2816c7701d3e112cbeab6a968eb556d5 /pykolab/cli/__init__.py
parent8eddcc101d0b2f1a6e80df0110b0a504003925f1 (diff)
downloadpykolab-7b0938388980cfbfe4f1c4b43baa1eb1ad7b0ac5.tar.gz
Eject the cli components from sys.argv
Diffstat (limited to 'pykolab/cli/__init__.py')
-rw-r--r--pykolab/cli/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pykolab/cli/__init__.py b/pykolab/cli/__init__.py
index 5860fd9..9c5f4b5 100644
--- a/pykolab/cli/__init__.py
+++ b/pykolab/cli/__init__.py
@@ -58,6 +58,9 @@ class Cli(object):
to_execute.append(sys.argv[arg_num].replace('-','_'))
+ for cmd_component in to_execute:
+ sys.argv.pop(sys.argv.index(cmd_component))
+
commands.execute('_'.join(to_execute))
def run(self):