Skip to content

Commit 78fed19

Browse files
committed
fix previous commit
1 parent 32c4dea commit 78fed19

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nipype/pipeline/plugins/linear.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,27 @@ def run(self, graph, config, updatehash=False):
3636
donotrun = []
3737
nodes, _ = topological_sort(graph)
3838
for node in nodes:
39+
status = 'end'
3940
try:
4041
if node in donotrun:
4142
continue
4243
if self._status_callback:
4344
self._status_callback(node, 'start')
4445
node.run(updatehash=updatehash)
45-
if self._status_callback:
46-
self._status_callback(node, 'end')
4746
except:
4847
# bare except, but i really don't know where a
4948
# node might fail
49+
status = 'exception'
5050
crashfile = report_crash(node)
51-
if str2bool(config['execution']['stop_on_first_crash']):
52-
raise
5351
# remove dependencies from queue
5452
subnodes = [s for s in dfs_preorder(graph, node)]
5553
notrun.append(
5654
dict(node=node, dependents=subnodes, crashfile=crashfile))
5755
donotrun.extend(subnodes)
56+
if str2bool(config['execution']['stop_on_first_crash']):
57+
raise
5858
finally:
5959
if self._status_callback:
60-
self._status_callback(node, 'exception')
60+
self._status_callback(node, status)
6161
os.chdir(old_wd)
6262
report_nodes_not_run(notrun)

0 commit comments

Comments
 (0)