summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-13 07:20:10 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-13 07:20:10 +0000
commitfe7440735d8527b281f642056f11579b428dce0f (patch)
tree894e18263ca55ccdf52ace1a53d08bcc03022e35 /ipalib
parent024345e1f05e8a07517388deb83a45f8e8fd0a63 (diff)
downloadfreeipa-fe7440735d8527b281f642056f11579b428dce0f.tar.gz
freeipa-fe7440735d8527b281f642056f11579b428dce0f.tar.xz
freeipa-fe7440735d8527b281f642056f11579b428dce0f.zip
148: Added some basic out put for cli.help.__call__() method
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/cli.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index d0cf10175..d2583f57d 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -46,6 +46,11 @@ def from_cli(cli_name):
class help(public.cmd):
'display help on command'
+ def __call__(self, key):
+ if from_cli(key) not in self.api.cmd:
+ print 'help: no such command %r' % key
+ sys.exit(2)
+ print 'Help on command %r:' % key
class CLI(object):