Commit 7a027f7c authored by S. Zeid's avatar S. Zeid

[cli/engine/cli] fix program help when no default command is set

parent 31e535bd
......@@ -109,6 +109,7 @@ def make_CLI_class():
cmd = self.commands.get(argv0, None)
default_arg = default
default = self.default_command if default is None.__class__ else default
doing_help = False
if not cmd:
debug("getting object for default command:", default)
cmd = self.commands.get(default, None)
......@@ -122,6 +123,8 @@ def make_CLI_class():
cmd = self.commands["shell"]
argv = ["sh", "--help"]
cmd = cmd(self)
if doing_help:
cmd._ShellCommand__is_shell = False
return cmd, argv
return CLI
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment