simplify resolver constructor
This commit is contained in:
parent
280886104c
commit
99e890bc99
@ -30,13 +30,7 @@ class StrategyResolver(object):
|
|||||||
config = config or {}
|
config = config or {}
|
||||||
|
|
||||||
# Verify the strategy is in the configuration, otherwise fallback to the default strategy
|
# Verify the strategy is in the configuration, otherwise fallback to the default strategy
|
||||||
if 'strategy' in config:
|
self.strategy = self._load_strategy(config.get('strategy') or Constants.DEFAULT_STRATEGY)
|
||||||
strategy = config['strategy']
|
|
||||||
else:
|
|
||||||
strategy = Constants.DEFAULT_STRATEGY
|
|
||||||
|
|
||||||
# Try to load the strategy
|
|
||||||
self.strategy = self._load_strategy(strategy)
|
|
||||||
|
|
||||||
# Set attributes
|
# Set attributes
|
||||||
# Check if we need to override configuration
|
# Check if we need to override configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user