Disable Defaulting to DefaultStrategy

This commit is contained in:
Matthias
2019-09-21 19:54:44 +02:00
parent 52ff391c8a
commit b73426b91f
11 changed files with 25 additions and 14 deletions

View File

@@ -66,9 +66,8 @@ AVAILABLE_CLI_OPTIONS = {
# Main options
"strategy": Arg(
'-s', '--strategy',
help='Specify strategy class name (default: `%(default)s`).',
help='Specify strategy class name which will be used by the bot.',
metavar='NAME',
default='DefaultStrategy',
),
"strategy_path": Arg(
'--strategy-path',

View File

@@ -128,7 +128,7 @@ class Configuration:
self._process_logging_options(config)
# Set strategy if not specified in config and or if it's non default
if self.args.get("strategy") != constants.DEFAULT_STRATEGY or not config.get('strategy'):
if self.args.get("strategy") or not config.get('strategy'):
config.update({'strategy': self.args.get("strategy")})
self._args_to_config(config, argname='strategy_path',