Revision 8741c407 kamaki/cli/command_tree.py
b/kamaki/cli/command_tree.py | ||
---|---|---|
70 | 70 |
|
71 | 71 |
@property |
72 | 72 |
def is_command(self): |
73 |
return self.cmd_class is not None |
|
73 |
return self.cmd_class is not None and len(self.subcommands) == 0
|
|
74 | 74 |
|
75 | 75 |
@property |
76 | 76 |
def has_description(self): |
... | ... | |
153 | 153 |
self._all_commands[path] = new_cmd |
154 | 154 |
cmd.add_subcmd(new_cmd) |
155 | 155 |
cmd = new_cmd |
156 |
if cmd_class is not None:
|
|
156 |
if cmd_class: |
|
157 | 157 |
cmd.set_class(cmd_class) |
158 | 158 |
if description is not None: |
159 | 159 |
cmd.help = description |
Also available in: Unified diff