From b0ec8fe551bc5f454aa1babeab31a424fd8c9abe Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Fri, 15 Aug 2008 19:49:04 +0000 Subject: 182: Renamed plublic.cmd base class to Command --- ipalib/cli.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ipalib/cli.py') 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()) -- cgit