Skip to content

Commit 1c23b50

Browse files
committed
Catch only KeyErrors when checking for env var
1 parent 6a8e875 commit 1c23b50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/interfaces/spm/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def version(matlab_cmd=None, paths=None, use_mcr=None):
144144
if matlab_cmd is None:
145145
try:
146146
matlab_cmd = os.environ['MATLABCMD']
147-
except:
147+
except KeyError:
148148
matlab_cmd = 'matlab -nodesktop -nosplash'
149149
mlab = MatlabCommand(matlab_cmd=matlab_cmd)
150150
mlab.inputs.mfile = False

0 commit comments

Comments
 (0)