Skip to content

Commit 096da88

Browse files
committed
FIX: Set default t_code even if no t_zoom
1 parent 1357a3b commit 096da88

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nibabel/nifti1.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,8 +1733,9 @@ def get_zooms(self, units=None, raise_unknown=False):
17331733
if xyz_code == 'unknown':
17341734
xyz_msg = 'Unknown spatial units'
17351735
xyz_code = 'mm'
1736-
if t_code == 'unknown' and t_zoom is not None:
1737-
t_msg = 'Unknown time units'
1736+
if t_code == 'unknown':
1737+
if t_zoom is not None:
1738+
t_msg = 'Unknown time units'
17381739
t_code = 'sec'
17391740
if raise_unknown and (xyz_msg, t_msg) != ('', ''):
17401741
if xyz_msg and t_msg:

0 commit comments

Comments
 (0)