Skip to content

Commit 82b89ee

Browse files
authored
Merge pull request #178 from dartmouth-pbs/bf-pydicom
BF: pydicom 1.0.2 provided custom exception while trying to import dicom
2 parents 4c0f8a1 + 008732b commit 82b89ee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

heudiconv/external/dcmstack.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
except ImportError as e:
1010
from heudiconv import lgr
1111
# looks different between py2 and 3 so we go for very rudimentary matching
12-
if not ("No module" in str(e) and "dicom" in str(e)):
12+
e_str = str(e)
13+
# there were changes from how
14+
if not (
15+
("No module" in e_str and "dicom" in e_str) or
16+
('has been removed in pydicom version' in e_str)
17+
):
1318
raise
1419
# a butt plug due to rename of dicom -> pydicom
1520
import sys

0 commit comments

Comments
 (0)