have Arguments return a dict instead of Namespace

This commit is contained in:
Matthias
2019-09-12 20:16:39 +02:00
parent 52b186eabe
commit e6ccc1427c
6 changed files with 56 additions and 60 deletions

View File

@@ -32,12 +32,12 @@ def main(sysargv: List[str] = None) -> None:
worker = None
try:
arguments = Arguments(sysargv)
args: Namespace = arguments.get_parsed_arg()
args = arguments.get_parsed_arg()
# A subcommand has been issued.
# Means if Backtesting or Hyperopt have been called we exit the bot
if hasattr(args, 'func'):
args.func(args)
if 'func' in args:
args['func'](args)
# TODO: fetch return_code as returned by the command function here
return_code = 0
else: