Skip to content

Commit 0a6f6cd

Browse files
committed
Create a crashfile even if 'stop_on_first_crash' is set.
1 parent 199d9a6 commit 0a6f6cd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nipype/pipeline/plugins/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ def _clean_queue(self, jobid, graph, result=None):
220220
result = {'result': None,
221221
'traceback': '\n'.join(format_exception(*sys.exc_info()))}
222222

223+
crashfile = self._report_crash(self.procs[jobid], result=result)
223224
if str2bool(self._config['execution']['stop_on_first_crash']):
224225
raise RuntimeError("".join(result['traceback']))
225-
crashfile = self._report_crash(self.procs[jobid], result=result)
226226
if jobid in self.mapnodesubids:
227227
# remove current jobid
228228
self.proc_pending[jobid] = False

nipype/pipeline/plugins/linear.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ def run(self, graph, config, updatehash=False):
4646
self._status_callback(node, 'end')
4747
except:
4848
os.chdir(old_wd)
49-
if str2bool(config['execution']['stop_on_first_crash']):
50-
raise
5149
# bare except, but i really don't know where a
5250
# node might fail
5351
crashfile = report_crash(node)
52+
if str2bool(config['execution']['stop_on_first_crash']):
53+
raise
5454
# remove dependencies from queue
5555
subnodes = [s for s in dfs_preorder(graph, node)]
5656
notrun.append(

0 commit comments

Comments
 (0)