Skip to content

Commit ce065cf

Browse files
committed
FIX: Only find paths for created files
1 parent 60de5ad commit ce065cf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nipype/interfaces/base/core.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,8 +1149,9 @@ def _list_outputs(self):
11491149
out_name = name
11501150
if trait_spec.output_name is not None:
11511151
out_name = trait_spec.output_name
1152-
outputs[out_name] = \
1153-
os.path.abspath(self._filename_from_source(name))
1152+
fname = self._filename_from_source(name)
1153+
if isdefined(fname):
1154+
outputs[out_name] = os.path.abspath(fname)
11541155
return outputs
11551156

11561157
def _parse_inputs(self, skip=None):

nipype/interfaces/fsl/tests/test_preprocess.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ def test_flirt(setup_flirt):
313313
os.path.join(os.getcwd(), flirter.inputs.out_file)
314314
assert outs['out_matrix_file'] == \
315315
os.path.join(os.getcwd(), flirter.inputs.out_matrix_file)
316+
assert not isdefined(flirter.inputs.out_log)
316317

317318

318319
# Mcflirt

0 commit comments

Comments
 (0)