@@ -170,12 +170,14 @@ class BaseInterface(Interface):
170
170
references_ = []
171
171
resource_monitor = True # Enabled for this interface IFF enabled in the config
172
172
173
- def __init__ (self , from_file = None , resource_monitor = None , ** inputs ):
173
+ def __init__ (self , from_file = None , resource_monitor = None ,
174
+ ignore_exception = False , ** inputs ):
174
175
if not self .input_spec :
175
176
raise Exception (
176
177
'No input_spec in class: %s' % self .__class__ .__name__ )
177
178
178
179
self .inputs = self .input_spec (** inputs )
180
+ self .ignore_exception = ignore_exception
179
181
180
182
if resource_monitor is not None :
181
183
self .resource_monitor = resource_monitor
@@ -470,7 +472,6 @@ def run(self, cwd=None, **inputs):
470
472
os .chdir (cwd ) # Change to the interface wd
471
473
472
474
enable_rm = config .resource_monitor and self .resource_monitor
473
- force_raise = not getattr (self .inputs , 'ignore_exception' , False )
474
475
self .inputs .trait_set (** inputs )
475
476
self ._check_mandatory_inputs ()
476
477
self ._check_version_requirements (self .inputs )
@@ -530,7 +531,7 @@ def run(self, cwd=None, **inputs):
530
531
runtime .traceback_args = ('\n ' .join (
531
532
['%s' % arg for arg in exc_args ]), )
532
533
533
- if force_raise :
534
+ if not self . ignore_exception :
534
535
raise
535
536
finally :
536
537
# This needs to be done always
0 commit comments