Skip to content

[wip]Fix/deprecated 2551 (closes #2551 #2508) #2552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions nipype/interfaces/base/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def _duecredit_cite(self):
r['path'] = self.__module__
due.cite(**r)

def run(self, cwd=None, **inputs):
def run(self, cwd=None, ignore_exception=None, **inputs):
"""Execute this interface.

This interface will not raise an exception if runtime.returncode is
Expand All @@ -464,6 +464,10 @@ def run(self, cwd=None, **inputs):
"""
from ...utils.profiler import ResourceMonitor

# if ignore_exception is not provided, taking self.ignore_exception
if ignore_exception is None:
ignore_exception = self.ignore_exception

# Tear-up: get current and prev directories
syscwd = rgetcwd(error=False) # Recover when wd does not exist
if cwd is None:
Expand Down Expand Up @@ -531,7 +535,7 @@ def run(self, cwd=None, **inputs):
runtime.traceback_args = ('\n'.join(
['%s' % arg for arg in exc_args]), )

if not self.ignore_exception:
if not ignore_exception:
raise
finally:
# This needs to be done always
Expand Down Expand Up @@ -919,10 +923,6 @@ def __init__(self, command=None, terminal_output=None, **inputs):
if terminal_output is not None:
self.terminal_output = terminal_output

# Attach terminal_output callback for backwards compatibility
self.inputs.on_trait_change(self._terminal_output_update,
'terminal_output')

@property
def cmd(self):
"""sets base command, immutable"""
Expand Down Expand Up @@ -950,9 +950,6 @@ def terminal_output(self, value):
for v in VALID_TERMINAL_OUTPUT])))
self._terminal_output = value

def _terminal_output_update(self):
self.terminal_output = self.terminal_output

def raise_exception(self, runtime):
raise RuntimeError(
('Command:\n{cmdline}\nStandard output:\n{stdout}\n'
Expand Down