Skip to content

Commit

Permalink
h5py does not raise base exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
woutdenolf committed Jan 29, 2025
1 parent e7b05b7 commit 953fd5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/silx/io/h5py_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def is_h5py_exception(e):
:param BaseException e:
:returns bool:
"""
if not isinstance(e, Exception):
return False
for frame in traceback.walk_tb(e.__traceback__):
for namespace in (frame[0].f_locals, frame[0].f_globals):
if namespace.get("__package__", None) == "h5py":
Expand Down

0 comments on commit 953fd5c

Please sign in to comment.