safe check for recursive_strategy_search in strategy_resolver

This commit is contained in:
Sam Germain 2022-04-10 18:50:51 -06:00
parent 9070114417
commit c876d42e36

View File

@ -167,7 +167,7 @@ class StrategyResolver(IResolver):
:param extra_dir: additional directory to search for the given strategy
:return: Strategy instance or None
"""
if config['recursive_strategy_search']:
if 'recursive_strategy_search' in config and config['recursive_strategy_search']:
extra_dirs: List[str] = [
path[0] for path in walk(f"{config['user_data_dir']}/{USERPATH_STRATEGIES}")
] # sub-directories