Skip to content

Commit 67b10fb

Browse files
committed
made required PR changes to logic and spacing
1 parent ab4e15a commit 67b10fb

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

nipype/interfaces/afni/utils.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -617,15 +617,12 @@ class CatMatvec(AFNICommand):
617617

618618
def _format_arg(self, name, spec, value):
619619
if name == 'in_file':
620-
xfm_args=''
621-
for v in value:
622-
if len(v[1])>0:
623-
xfm_args += ' ' + v[0] + ' -' + v[1] + ' '
624-
else:
625-
xfm_args += ' ' + v[0] + ' '
626-
return spec.argstr % (xfm_args)
620+
# Concatenate a series of filenames, with optional opkeys
621+
return ' '.join('%s -%s' % (mfile, opkey) if opkey else mfile
622+
for mfile, opkey in value)
627623
return super(CatMatvec, self)._format_arg(name, spec, value)
628624

625+
629626
class CenterMassInputSpec(CommandLineInputSpec):
630627
in_file = File(
631628
desc='input file to 3dCM',

0 commit comments

Comments
 (0)