summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):