Skip to content

Commit 0e6b0f3

Browse files
authored
Merge pull request #2552 from djarecka/fix/deprecated_2551
[wip]Fix/deprecated 2551 (closes #2551 #2508)
2 parents dfcc338 + 22e9dca commit 0e6b0f3

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

nipype/interfaces/base/core.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def _duecredit_cite(self):
445445
r['path'] = self.__module__
446446
due.cite(**r)
447447

448-
def run(self, cwd=None, **inputs):
448+
def run(self, cwd=None, ignore_exception=None, **inputs):
449449
"""Execute this interface.
450450
451451
This interface will not raise an exception if runtime.returncode is
@@ -464,6 +464,10 @@ def run(self, cwd=None, **inputs):
464464
"""
465465
from ...utils.profiler import ResourceMonitor
466466

467+
# if ignore_exception is not provided, taking self.ignore_exception
468+
if ignore_exception is None:
469+
ignore_exception = self.ignore_exception
470+
467471
# Tear-up: get current and prev directories
468472
syscwd = rgetcwd(error=False) # Recover when wd does not exist
469473
if cwd is None:
@@ -531,7 +535,7 @@ def run(self, cwd=None, **inputs):
531535
runtime.traceback_args = ('\n'.join(
532536
['%s' % arg for arg in exc_args]), )
533537

534-
if not self.ignore_exception:
538+
if not ignore_exception:
535539
raise
536540
finally:
537541
# This needs to be done always
@@ -919,10 +923,6 @@ def __init__(self, command=None, terminal_output=None, **inputs):
919923
if terminal_output is not None:
920924
self.terminal_output = terminal_output
921925

922-
# Attach terminal_output callback for backwards compatibility
923-
self.inputs.on_trait_change(self._terminal_output_update,
924-
'terminal_output')
925-
926926
@property
927927
def cmd(self):
928928
"""sets base command, immutable"""
@@ -950,9 +950,6 @@ def terminal_output(self, value):
950950
for v in VALID_TERMINAL_OUTPUT])))
951951
self._terminal_output = value
952952

953-
def _terminal_output_update(self):
954-
self.terminal_output = self.terminal_output
955-
956953
def raise_exception(self, runtime):
957954
raise RuntimeError(
958955
('Command:\n{cmdline}\nStandard output:\n{stdout}\n'

0 commit comments

Comments
 (0)