Skip to content

Commit 5673457

Browse files
committed
fix: let spm use base class for version
1 parent 447e7f1 commit 5673457

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

nipype/interfaces/freesurfer/tests/test_auto_MRIConvert.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,4 @@ def test_MRIConvert_outputs():
196196
for key, metadata in output_map.items():
197197
for metakey, value in metadata.items():
198198
yield assert_equal, getattr(outputs.traits()[key], metakey), value
199+

nipype/interfaces/spm/preprocess.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,8 @@ class Segment(SPMCommand):
766766
767767
"""
768768

769-
if Info.version() and Info.version()['name'] == "SPM12":
769+
_local_version = SPMCommand().version
770+
if _local_version and _local_version['name'] == "SPM12":
770771
_jobtype = 'tools'
771772
_jobname = 'oldseg'
772773
else:
@@ -893,7 +894,8 @@ class NewSegment(SPMCommand):
893894

894895
input_spec = NewSegmentInputSpec
895896
output_spec = NewSegmentOutputSpec
896-
if Info.version() and Info.version()['name'] == "SPM12":
897+
_local_version = SPMCommand().version
898+
if _local_version and _local_version['name'] == "SPM12":
897899
_jobtype = 'spatial'
898900
_jobname = 'preproc'
899901
else:

nipype/pipeline/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ def clean_working_directory(outputs, cwd, inputs, needed_outputs, config,
993993
inputdict = inputs.get()
994994
input_files.extend(walk_outputs(inputdict))
995995
needed_files += [path for path, type in input_files if type == 'f']
996-
for extra in ['_0x*.json', 'provenance.*', 'pyscript*.m',
996+
for extra in ['_0x*.json', 'provenance.*', 'pyscript*.m', 'pyjobs*.mat',
997997
'command.txt', 'result*.pklz', '_inputs.pklz', '_node.pklz']:
998998
needed_files.extend(glob(os.path.join(cwd, extra)))
999999
if files2keep:

0 commit comments

Comments
 (0)