Skip to content

Commit 32c4dea

Browse files
committed
make sure exception callback is called with stop_on_first_crash on
1 parent 4b51777 commit 32c4dea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/pipeline/plugins/linear.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def run(self, graph, config, updatehash=False):
4545
if self._status_callback:
4646
self._status_callback(node, 'end')
4747
except:
48-
os.chdir(old_wd)
4948
# bare except, but i really don't know where a
5049
# node might fail
5150
crashfile = report_crash(node)
@@ -56,6 +55,8 @@ def run(self, graph, config, updatehash=False):
5655
notrun.append(
5756
dict(node=node, dependents=subnodes, crashfile=crashfile))
5857
donotrun.extend(subnodes)
58+
finally:
5959
if self._status_callback:
6060
self._status_callback(node, 'exception')
61+
os.chdir(old_wd)
6162
report_nodes_not_run(notrun)

0 commit comments

Comments
 (0)