Skip to content

Commit d004b83

Browse files
committed
fix: remove json files when rerunning a mapnode
1 parent a17e977 commit d004b83

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nipype/pipeline/engine.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,10 @@ def run(self, updatehash=False):
12981298
logger.debug(("%s found and can_resume is True or Node is a "
12991299
"MapNode - resuming execution") %
13001300
hashfile_unfinished)
1301+
if isinstance(self, MapNode):
1302+
# remove old json files
1303+
for filename in glob(os.path.join(outdir, '*.json')):
1304+
os.unlink(filename)
13011305
outdir = make_output_dir(outdir)
13021306
self._save_hashfile(hashfile_unfinished, hashed_inputs)
13031307
self.write_report(report_type='preexec', cwd=outdir)

0 commit comments

Comments
 (0)