File tree 3 files changed +11
-13
lines changed
3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -294,13 +294,10 @@ class AFNIPythonCommandInputSpec(CommandLineInputSpec):
294
294
class AFNIPythonCommand (AFNICommand ):
295
295
@property
296
296
def cmd (self ):
297
- if spawn .find_executable (super (AFNIPythonCommand ,
298
- self ).cmd ) is not None :
299
- return spawn .find_executable (super (AFNIPythonCommand , self ).cmd )
300
- else :
301
- return super (AFNIPythonCommand , self ).cmd
297
+ orig_cmd = super (AFNIPythonCommand , self ).cmd
298
+ found = spawn .find_executable (orig_cmd )
299
+ return found if found is not None else orig_cmd
302
300
303
301
@property
304
- def cmdline (self ):
305
- return "{} {}" .format (self .inputs .py27_path ,
306
- super (AFNIPythonCommand , self ).cmdline )
302
+ def _cmd_prefix (self ):
303
+ return "{} " .format (self .inputs .py27_path )
Original file line number Diff line number Diff line change @@ -655,8 +655,9 @@ def cmdline(self):
655
655
files = self ._get_filelist (outdir )
656
656
for infile , outfile in files :
657
657
if not os .path .exists (outfile ):
658
- single_cmd = '%s %s %s' % (self .cmd , infile ,
659
- os .path .join (outdir , outfile ))
658
+ single_cmd = '%s%s %s %s' % (self ._cmd_prefix , self .cmd ,
659
+ infile , os .path .join (outdir ,
660
+ outfile ))
660
661
cmd .extend ([single_cmd ])
661
662
return '; ' .join (cmd )
662
663
Original file line number Diff line number Diff line change @@ -1742,15 +1742,15 @@ def _list_outputs(self):
1742
1742
@property
1743
1743
def cmdline (self ):
1744
1744
output_file_base = self .inputs .output_file_base
1745
+ orig_cmdline = super (Blur , self ).cmdline
1745
1746
1746
1747
if isdefined (output_file_base ):
1747
- return super ( Blur , self ). cmdline
1748
+ return orig_cmdline
1748
1749
else :
1749
1750
# FIXME this seems like a bit of a hack. Can we force output_file
1750
1751
# to show up in cmdline by default, even if it isn't specified in
1751
1752
# the instantiation of Pik?
1752
- return '%s %s' % (super (Blur , self ).cmdline ,
1753
- self ._gen_output_base ())
1753
+ return '%s %s' % (orig_cmdline , self ._gen_output_base ())
1754
1754
1755
1755
1756
1756
class MathInputSpec (CommandLineInputSpec ):
You can’t perform that action at this time.
0 commit comments