Skip to content
Snippets Groups Projects
Commit 94c785bc authored by pswain's avatar pswain
Browse files

"Added detailed error message when dir missing"

parent bd2c6e3c
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ class Grouper(ABC): ...@@ -24,7 +24,7 @@ class Grouper(ABC):
def __init__(self, dir: Union[str, PosixPath]): def __init__(self, dir: Union[str, PosixPath]):
"""Find h5 files and load a chain for each one.""" """Find h5 files and load a chain for each one."""
path = Path(dir) path = Path(dir)
assert path.exists(), "Dir does not exist" assert path.exists(), f"{str(dir)} does not exist"
self.name = path.name self.name = path.name
self.files = list(path.glob("*.h5")) self.files = list(path.glob("*.h5"))
assert len(self.files), "No valid h5 files in dir" assert len(self.files), "No valid h5 files in dir"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment