Don't fail when --strategy-path is not a valid directory.

closes #7264
This commit is contained in:
Matthias
2022-08-22 09:18:51 +00:00
parent 914b6247e4
commit f55d5ffd8c
2 changed files with 8 additions and 1 deletions

View File

@@ -193,7 +193,10 @@ class IResolver:
:return: List of dicts containing 'name', 'class' and 'location' entries
"""
logger.debug(f"Searching for {cls.object_type.__name__} '{directory}'")
objects = []
objects: List[Dict[str, Any]] = []
if not directory.is_dir():
logger.info(f"'{directory}' is not a directory, skipping.")
return objects
for entry in directory.iterdir():
if (
recursive and entry.is_dir()