Skip to content

Commit 01b5bd4

Browse files
authored
BUG: Fix minor bug with T1 check (mne-tools#13588)
1 parent 581682f commit 01b5bd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mne/bem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,11 +2176,11 @@ def make_flash_bem(
21762176
# Step 5b and c : Convert the mgz volumes into COR
21772177
convert_T1 = False
21782178
T1_dir = mri_dir / "T1"
2179-
if not T1_dir.is_dir() or next(T1_dir.glob("COR*")) is None:
2179+
if not T1_dir.is_dir() or len(list(T1_dir.glob("COR*"))) == 0:
21802180
convert_T1 = True
21812181
convert_brain = False
21822182
brain_dir = mri_dir / "brain"
2183-
if not brain_dir.is_dir() or next(brain_dir.glob("COR*")) is None:
2183+
if not brain_dir.is_dir() or len(list(brain_dir.glob("COR*"))) == 0:
21842184
convert_brain = True
21852185
logger.info("\n---- Converting T1 volume into COR format ----")
21862186
if convert_T1:

0 commit comments

Comments
 (0)