summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-13 06:40:25 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-13 06:40:25 +0000
commitd422ef1134d81123b059574d13060811534e1d0d (patch)
treefe01382fcf2f9f2b19cb7e72f31bea1b9a297ade /ipalib/cli.py
parent337c9964d42066368460da9a7c0d770142e2d1c3 (diff)
downloadfreeipa-d422ef1134d81123b059574d13060811534e1d0d.tar.gz
freeipa-d422ef1134d81123b059574d13060811534e1d0d.tar.xz
freeipa-d422ef1134d81123b059574d13060811534e1d0d.zip
146: Removed CLI.parse_kw() method and corresponding unit tests
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index bf96d3698..d0cf10175 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -98,19 +98,8 @@ class CLI(object):
self.run_cmd(cmd, sys.argv[2:])
def run_cmd(self, cmd, given):
- print self.parse(given)
- sys.exit(0)
- kw = dict(self.parse_kw(args))
- self[cmd](**kw)
-
- def parse_kw(self, args):
- for arg in args:
- m = re.match(r'^--([a-z][-a-z0-9]*)=(.+)$', arg)
- if m is not None:
- yield (
- from_cli(m.group(1)),
- m.group(2),
- )
+ (args, kw) = self.parse(given)
+ self[cmd](*args, **kw)
def parse(self, given):
args = []
@@ -123,7 +112,6 @@ class CLI(object):
args.append(g)
return (args, kw)
-
def __get_mcl(self):
"""
Returns the Max Command Length.