Fixes strategy config from file logic

This commit is contained in:
Jonathan Raviotta 2019-11-09 17:37:01 -05:00
parent 3f65c31883
commit 7e45a4367b

View File

@ -152,9 +152,9 @@ class Configuration:
self._process_logging_options(config) self._process_logging_options(config)
# Set strategy if not specified in config and or if it's non default if ("strategy" in self.args and self.args["strategy"] and
if self.args.get("strategy") != constants.DEFAULT_STRATEGY or not config.get('strategy'): self.args['strategy'] != constants.DEFAULT_STRATEGY):
config.update({'strategy': self.args.get("strategy")}) config.update({'strategy': self.args['strategy']})
self._args_to_config(config, argname='strategy_path', self._args_to_config(config, argname='strategy_path',
logstring='Using additional Strategy lookup path: {}') logstring='Using additional Strategy lookup path: {}')
@ -350,7 +350,7 @@ class Configuration:
configuration instead of the content) configuration instead of the content)
""" """
if (argname in self.args and self.args[argname] is not None if (argname in self.args and self.args[argname] is not None
and self.args[argname] is not False): and self.args[argname] is not False):
config.update({argname: self.args[argname]}) config.update({argname: self.args[argname]})
if logfun: if logfun: