summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-15 19:49:04 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-15 19:49:04 +0000
commitb0ec8fe551bc5f454aa1babeab31a424fd8c9abe (patch)
tree29cab05901d1aff75540d06bb4777efc1bf565c7 /ipalib/cli.py
parent99450358af821b269d46581750d20730fb5c9e9f (diff)
downloadfreeipa-b0ec8fe551bc5f454aa1babeab31a424fd8c9abe.tar.gz
freeipa-b0ec8fe551bc5f454aa1babeab31a424fd8c9abe.tar.xz
freeipa-b0ec8fe551bc5f454aa1babeab31a424fd8c9abe.zip
182: Renamed plublic.cmd base class to Command
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 8f09e90c..1ad53058 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -43,10 +43,10 @@ def from_cli(cli_name):
return str(cli_name).replace('-', '_')
-class help(public.cmd):
+class help(public.Command):
'display help on command'
def __call__(self, key):
- if from_cli(key) not in self.api.cmd:
+ if from_cli(key) not in self.api.Command:
print 'help: no such command %r' % key
sys.exit(2)
print 'Help on command %r:' % key
@@ -65,7 +65,7 @@ class CLI(object):
def print_commands(self):
print 'Available Commands:'
- for cmd in self.api.cmd():
+ for cmd in self.api.Command():
print ' %s %s' % (
to_cli(cmd.name).ljust(self.mcl),
cmd.doc,
@@ -84,7 +84,7 @@ class CLI(object):
api.register(help)
api.finalize()
def d_iter():
- for cmd in api.cmd():
+ for cmd in api.Command():
yield (to_cli(cmd.name), cmd)
self.__d = dict(d_iter())