Skip to content

Commit 1b0c69a

Browse files
committed
fix: added forced removal and running of multiple hashfiles
1 parent d004b83 commit 1b0c69a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nipype/pipeline/engine.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,11 @@ def hash_exists(self, updatehash=False):
12051205
# of the dictionary itself.
12061206
hashed_inputs, hashvalue = self._get_hashval()
12071207
outdir = self.output_dir()
1208+
hashfiles = glob(os.path.join(outdir, '*.json'))
1209+
if len(hashfiles) > 1:
1210+
warn('Removing multiple hashfiles and forcing node to rerun')
1211+
for hashfile in hashfiles:
1212+
os.unlink(hashfile)
12081213
hashfile = os.path.join(outdir, '_0x%s.json' % hashvalue)
12091214
if updatehash and os.path.exists(outdir):
12101215
logger.debug("Updating hash: %s" % hashvalue)

0 commit comments

Comments
 (0)