Revision 0ec19fd3 kamaki/cli/command_shell.py
b/kamaki/cli/command_shell.py | ||
---|---|---|
199 | 199 |
ldescr = getattr(cls, 'long_description', '') |
200 | 200 |
if subcmd.path == 'history_run': |
201 | 201 |
instance = cls( |
202 |
dict(cmd_parser.arguments), |
|
202 |
dict(cmd_parser.arguments), self.auth_base,
|
|
203 | 203 |
cmd_tree=self.cmd_tree) |
204 | 204 |
else: |
205 | 205 |
instance = cls( |
206 | 206 |
dict(cmd_parser.arguments), |
207 |
self.auth_base, |
|
208 |
self.cloud) |
|
207 |
self.auth_base, self.cloud) |
|
209 | 208 |
cmd_parser.update_arguments(instance.arguments) |
210 | 209 |
cmd_parser.arguments = instance.arguments |
211 | 210 |
cmd_parser.syntax = '%s %s' % ( |
... | ... | |
223 | 222 |
|
224 | 223 |
for name, arg in instance.arguments.items(): |
225 | 224 |
arg.value = getattr( |
226 |
cmd_parser.parsed, |
|
227 |
name, |
|
228 |
arg.default) |
|
225 |
cmd_parser.parsed, name, arg.default) |
|
229 | 226 |
|
230 | 227 |
exec_cmd(instance, cmd_parser.unparsed, help_method) |
231 | 228 |
#[term for term in cmd_parser.unparsed\ |
... | ... | |
283 | 280 |
empty, sep, subname = subcmd.path.partition(cmd.path) |
284 | 281 |
cmd_name = '%s %s' % (cmd.name, subname.replace('_', ' ')) |
285 | 282 |
print('\n%s\nSyntax:\t%s %s' % ( |
286 |
cls.description, |
|
287 |
cmd_name, |
|
288 |
cls.syntax)) |
|
283 |
cls.description, cmd_name, cls.syntax)) |
|
289 | 284 |
cmd_args = {} |
290 | 285 |
for arg in instance.arguments.values(): |
291 | 286 |
cmd_args[','.join(arg.parsed_name)] = arg.help |
Also available in: Unified diff