Revision 49e85ee2 kamaki/cli/command_shell.py
b/kamaki/cli/command_shell.py | ||
---|---|---|
175 | 175 |
tmp_args.pop('verbose', None) |
176 | 176 |
tmp_args.pop('silent', None) |
177 | 177 |
tmp_args.pop('config', None) |
178 |
help_parser = ArgumentParseManager(cmd_name, tmp_args, required) |
|
179 |
help_parser.parser.description = descr |
|
180 |
help_parser.syntax = syntax |
|
181 |
#return help_parser.parser.print_help |
|
178 |
help_parser = ArgumentParseManager( |
|
179 |
cmd_name, tmp_args, required, syntax=syntax, description=descr) |
|
182 | 180 |
return help_parser.print_help |
183 | 181 |
|
184 | 182 |
def _register_command(self, cmd_path): |
... | ... | |
213 | 211 |
self.auth_base, self.cloud) |
214 | 212 |
cmd_parser.update_arguments(instance.arguments) |
215 | 213 |
cmd_parser.arguments = instance.arguments |
214 |
subpath = subcmd.path.split('_')[ |
|
215 |
(len(cmd.path.split('_')) - 1):] |
|
216 | 216 |
cmd_parser.syntax = '%s %s' % ( |
217 |
subcmd.path.replace('_', ' '), cls.syntax)
|
|
217 |
' '.join(subpath), instance.syntax)
|
|
218 | 218 |
help_method = self._create_help_method( |
219 |
cmd.name, cmd_parser.arguments, cmd_parser.required,
|
|
220 |
subcmd.help, cmd_parser.syntax) |
|
219 |
cmd.name, cmd_parser.arguments, |
|
220 |
cmd_parser.required, subcmd.help, cmd_parser.syntax)
|
|
221 | 221 |
if '-h' in cmd_args or '--help' in cmd_args: |
222 | 222 |
help_method() |
223 | 223 |
if ldescr.strip(): |
Also available in: Unified diff