Skip to content

Commit 491c123

Browse files
committed
do not chdir after all nodes are run
1 parent 47ba1ef commit 491c123

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nipype/pipeline/plugins/linear.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@ def run(self, graph, config, updatehash=False):
5757
donotrun.extend(subnodes)
5858
# Delay raising the crash until we cleaned the house
5959
if str2bool(config['execution']['stop_on_first_crash']):
60+
os.chdir(old_wd) # Return wherever we were before
6061
report_nodes_not_run(notrun) # report before raising
6162
raise
6263
finally:
63-
# Return wherever we were before
64-
os.chdir(old_wd)
6564
if self._status_callback:
6665
self._status_callback(node, endstatus)
66+
67+
os.chdir(old_wd) # Return wherever we were before
6768
report_nodes_not_run(notrun)

0 commit comments

Comments
 (0)