From 99e890bc99c93685d0406dcf12617d41c494c8b0 Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 24 Mar 2018 23:22:31 +0100 Subject: [PATCH] simplify resolver constructor --- freqtrade/strategy/resolver.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/freqtrade/strategy/resolver.py b/freqtrade/strategy/resolver.py index 5709d15a7..d5e9e7b5c 100644 --- a/freqtrade/strategy/resolver.py +++ b/freqtrade/strategy/resolver.py @@ -30,13 +30,7 @@ class StrategyResolver(object): config = config or {} # Verify the strategy is in the configuration, otherwise fallback to the default strategy - if 'strategy' in config: - strategy = config['strategy'] - else: - strategy = Constants.DEFAULT_STRATEGY - - # Try to load the strategy - self.strategy = self._load_strategy(strategy) + self.strategy = self._load_strategy(config.get('strategy') or Constants.DEFAULT_STRATEGY) # Set attributes # Check if we need to override configuration