Skip to content

Commit

Permalink
fix error type
Browse files Browse the repository at this point in the history
  • Loading branch information
lappalainenj committed May 22, 2024
1 parent e7960e8 commit 8cb7da6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datamate/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,10 @@ def __getitem__(self, key: str) -> Any:
path = self.path / key
except TypeError as e:
if not self.path.exists():
# we wanted to index an H5Dataset but we tried to index a Directory
# because the H5Dataset does not exist
raise (
AssertionError(
FileNotFoundError(
f"Indexing {self.path.name} at {key} not possible for"
f" Directory at {self.path.parent}. File "
f"{self.path.name}.h5 does not exist."
Expand Down

0 comments on commit 8cb7da6

Please sign in to comment.