Revision 56d84a4e kamaki/cli/one_command.py
b/kamaki/cli/one_command.py | ||
---|---|---|
58 | 58 |
def run(cloud, parser, _help): |
59 | 59 |
group = get_command_group(list(parser.unparsed), parser.arguments) |
60 | 60 |
if not group: |
61 |
parser.parser.print_help() |
|
61 |
#parser.parser.print_help() |
|
62 |
parser.print_help() |
|
62 | 63 |
_groups_help(parser.arguments) |
63 | 64 |
exit(0) |
64 | 65 |
|
... | ... | |
92 | 93 |
update_parser_help(parser, cmd) |
93 | 94 |
|
94 | 95 |
if _help or not cmd.is_command: |
95 |
parser.parser.print_help() |
|
96 |
#parser.parser.print_help() |
|
97 |
if cmd.cmd_class: |
|
98 |
parser.required = getattr(cmd.cmd_class, 'required', None) |
|
99 |
parser.print_help() |
|
96 | 100 |
if getattr(cmd, 'long_help', False): |
97 | 101 |
print 'Details:\n', cmd.long_help |
98 | 102 |
print_subcommands_help(cmd) |
... | ... | |
102 | 106 |
auth_base = init_cached_authenticator(_cnf, cloud, kloger) if ( |
103 | 107 |
cloud) else None |
104 | 108 |
executable = cls(parser.arguments, auth_base, cloud) |
109 |
parser.required = getattr(cls, 'required', None) |
|
105 | 110 |
parser.update_arguments(executable.arguments) |
106 | 111 |
for term in _best_match: |
107 | 112 |
parser.unparsed.remove(term) |
108 |
exec_cmd(executable, parser.unparsed, parser.parser.print_help) |
|
113 |
#exec_cmd(executable, parser.unparsed, parser.parser.print_help) |
|
114 |
exec_cmd(executable, parser.unparsed, parser.print_help) |
Also available in: Unified diff