Skip to content

Commit ecd509d

Browse files
committed
Does not crash if SPM is not installed.
1 parent 5191e8c commit ecd509d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/workflows/fmri/spm/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def create_DARTEL_template(name='dartel_template'):
256256
workflow.connect(inputnode, 'structural_files', segment, 'channel_files')
257257
if not no_matlab:
258258
version = spm.Info.version()
259-
if version['name'] == 'SPM8':
259+
if version and version['name'] == 'SPM8':
260260
spm_path = version['path']
261261
tissue1 = ((os.path.join(spm_path,'toolbox/Seg/TPM.nii'), 1), 2, (True,True), (False, False))
262262
tissue2 = ((os.path.join(spm_path,'toolbox/Seg/TPM.nii'), 2), 2, (True,True), (False, False))

0 commit comments

Comments
 (0)