From 09e8d784b899ed87398099aaf4a9d19d1f461018 Mon Sep 17 00:00:00 2001 From: Marvin Poul Date: Thu, 1 Aug 2024 14:27:24 +0200 Subject: [PATCH] Give unique names to burried jobs in case of multiple fixes --- pyiron_contrib/repair/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyiron_contrib/repair/__init__.py b/pyiron_contrib/repair/__init__.py index 94a460dd4..0e1109d0a 100644 --- a/pyiron_contrib/repair/__init__.py +++ b/pyiron_contrib/repair/__init__.py @@ -193,6 +193,11 @@ def fix_job(self, tool, job, graveyard=None): if graveyard is None: job.remove() else: + try: + no = len(job.content["user/handyman/history"]) + except KeyError: + no = 0 + job.rename(f'{job.name}_fix_{no}') job.move_to(graveyard) new_job.rename(name)