Skip to content

Commit c64d7d0

Browse files
ostanleymgxd
authored andcommitted
made required PR changes to logic and spacing
1 parent 7306047 commit c64d7d0

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
@@ -619,15 +619,12 @@ class CatMatvec(AFNICommand):
619619

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

627+
631628
class CenterMassInputSpec(CommandLineInputSpec):
632629
in_file = File(
633630
desc='input file to 3dCM',

0 commit comments

Comments
 (0)