Revision c22183b9
b/kamaki/cli/__init__.py | ||
---|---|---|
512 | 512 |
filelog = logger.add_file_logger(__name__.split('.')[0]) |
513 | 513 |
filelog.info('* Initial Call *\n%s\n- - -' % ' '.join(argv)) |
514 | 514 |
|
515 |
cloud = _init_session(parser.arguments, is_non_API(parser)) |
|
516 | 515 |
from kamaki.cli.utils import suggest_missing |
517 | 516 |
global _colors |
518 | 517 |
exclude = ['ansicolors'] if not _colors == 'on' else [] |
519 | 518 |
suggest_missing(exclude=exclude) |
520 |
foo(exe, parser, cloud)
|
|
519 |
foo(exe, parser) |
|
521 | 520 |
except CLIError as err: |
522 | 521 |
print_error_message(err) |
523 | 522 |
if _debug: |
... | ... | |
535 | 534 |
|
536 | 535 |
|
537 | 536 |
@main |
538 |
def run_shell(exe, parser, cloud): |
|
537 |
def run_shell(exe, parser): |
|
538 |
parser.arguments['help'].value = False |
|
539 |
cloud = _init_session(parser.arguments) |
|
539 | 540 |
from command_shell import _init_shell |
540 | 541 |
global kloger |
541 | 542 |
_cnf = parser.arguments['config'] |
... | ... | |
551 | 552 |
|
552 | 553 |
|
553 | 554 |
@main |
554 |
def run_one_cmd(exe, parser, cloud): |
|
555 |
def run_one_cmd(exe, parser): |
|
556 |
cloud = _init_session(parser.arguments, is_non_API(parser)) |
|
555 | 557 |
if parser.unparsed: |
556 | 558 |
global _history |
557 | 559 |
try: |
b/kamaki/cli/argument/__init__.py | ||
---|---|---|
103 | 103 |
|
104 | 104 |
@property |
105 | 105 |
def value(self): |
106 |
return super(ConfigArgument, self).value
|
|
106 |
return getattr(self, '_value', None)
|
|
107 | 107 |
|
108 | 108 |
@value.setter |
109 | 109 |
def value(self, config_file): |
b/kamaki/cli/config/__init__.py | ||
---|---|---|
291 | 291 |
|
292 | 292 |
:raises KeyError: if cloud or cloud's option does not exist |
293 | 293 |
""" |
294 |
r = self.get(CLOUD_PREFIX, cloud) |
|
294 |
r = self.get(CLOUD_PREFIX, cloud) if cloud else None
|
|
295 | 295 |
if not r: |
296 | 296 |
raise KeyError('Cloud "%s" does not exist' % cloud) |
297 | 297 |
return r[option] |
Also available in: Unified diff