From ba8d32a110f3dc96b091df9a2520f60c99ac26ba Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Thu, 14 Aug 2008 05:46:20 +0000 Subject: 150: NameSpace.__iter__() now iterates through the names, not the members; added NameSpace.__call__() method which iterates through the members; NameSpace no longer requires members to be Proxy instances; updated unit tests and affected code; cleaned up NameSpace docstrings and switch to epydoc param docstrings --- ipalib/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipalib/cli.py') diff --git a/ipalib/cli.py b/ipalib/cli.py index d17d12bc..8f09e90c 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -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.cmd(): 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.cmd(): yield (to_cli(cmd.name), cmd) self.__d = dict(d_iter()) -- cgit