Skip to content

Commit 32cd9b8

Browse files
committed
FIX: Undo defined check, simplify abspath call
1 parent ef25d15 commit 32cd9b8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,19 +490,19 @@ def _format_arg(self, name, trait_spec, value):
490490
def _list_outputs(self):
491491
outputs = super(Allineate, self)._list_outputs()
492492

493-
if isdefined(self.inputs.out_weight_file):
493+
if self.inputs.out_weight_file:
494494
outputs['out_weight_file'] = op.abspath(
495495
self.inputs.out_weight_file)
496496

497-
if isdefined(self.inputs.out_matrix):
497+
if self.inputs.out_matrix:
498498
path, base, ext = split_filename(self.inputs.out_matrix)
499499
if ext.lower() not in ['.1d', '.1D']:
500500
outputs['out_matrix'] = self._gen_fname(
501501
self.inputs.out_matrix, suffix='.aff12.1D')
502502
else:
503503
outputs['out_matrix'] = op.abspath(self.inputs.out_matrix)
504504

505-
if isdefined(self.inputs.out_param_file):
505+
if self.inputs.out_param_file:
506506
path, base, ext = split_filename(self.inputs.out_param_file)
507507
if ext.lower() not in ['.1d', '.1D']:
508508
outputs['out_param_file'] = self._gen_fname(
@@ -511,9 +511,8 @@ def _list_outputs(self):
511511
outputs['out_param_file'] = op.abspath(
512512
self.inputs.out_param_file)
513513

514-
if isdefined(self.inputs.allcostx):
515-
outputs['allcostX'] = os.path.abspath(
516-
os.path.join(os.getcwd(), self.inputs.allcostx))
514+
if self.inputs.allcostx:
515+
outputs['allcostX'] = os.path.abspath(self.inputs.allcostx)
517516
return outputs
518517

519518

0 commit comments

Comments
 (0)