forked from uncloud/uncloud
Do not break if client section/or OTP creds missing from conf file
This commit is contained in:
parent
e91fd9e24a
commit
00d876aea1
4 changed files with 20 additions and 15 deletions
|
|
@ -12,12 +12,12 @@ for component in ['user', 'host', 'image', 'network', 'vm']:
|
|||
subparser.add_parser(name=parser.prog, parents=[parser])
|
||||
|
||||
|
||||
def main(**kwargs):
|
||||
if not kwargs['subcommand']:
|
||||
def main(arguments):
|
||||
if not arguments['subcommand']:
|
||||
arg_parser.print_help()
|
||||
else:
|
||||
name = kwargs.pop('subcommand')
|
||||
kwargs.pop('debug')
|
||||
name = arguments.pop('subcommand')
|
||||
arguments.pop('debug')
|
||||
mod = importlib.import_module('uncloud.cli.{}'.format(name))
|
||||
_main = getattr(mod, 'main')
|
||||
_main(**kwargs)
|
||||
_main(**arguments)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue