Skip to content

Commit

Permalink
Better error message when seach_subdirs fails
Browse files Browse the repository at this point in the history
fixes #69
  • Loading branch information
melund committed Sep 14, 2021
1 parent 3fd7bb0 commit 4e2bda2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions anypytools/abcutils.py
Expand Up @@ -748,6 +748,10 @@ def start_macro(
# Extend the folderlist if search_subdir is given
if isinstance(search_subdirs, str) and isinstance(folderlist[0], str):
folderlist = sum([getsubdirs(d, search_subdirs) for d in folderlist], [])
if len(folderlist) == 0:
raise ValueError(
f"No subdirectories found, which match the file:{search_subdirs}"
)
# Check for explicit logfile
if not isinstance(logfile, (type(None), str, os.PathLike)):
raise ValueError("logfile must be a str or path")
Expand Down

0 comments on commit 4e2bda2

Please sign in to comment.