From 7fafd398908f95b71c535078350101b26cbdd755 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Thu, 21 Jan 2016 22:19:44 +0000 Subject: [PATCH] Bug fix in the MATLAB interface for recent SPM standalones In SPM12 standalone r6685 and above, the MATLAB function mfilename() is overloaded and care must now be taken when calling it. This change is backward compatible with older SPM versions. --- nipype/interfaces/matlab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/interfaces/matlab.py b/nipype/interfaces/matlab.py index fe9d4457a6..a81076b31f 100644 --- a/nipype/interfaces/matlab.py +++ b/nipype/interfaces/matlab.py @@ -168,9 +168,9 @@ def _gen_matlab_command(self, argstr, script_lines): prescript = self.inputs.prescript postscript = self.inputs.postscript - # postcript takes different default value depending on the mfile argument + # prescript takes different default value depending on the mfile argument if mfile: - prescript.insert(0, "fprintf(1,'Executing %s at %s:\\n',mfilename,datestr(now));") + prescript.insert(0, "fprintf(1,'Executing %s at %s:\\n',mfilename(),datestr(now));") else: prescript.insert(0, "fprintf(1,'Executing code at %s:\\n',datestr(now));") for path in paths: