From 181a0be0af2098ca0e364432168f3e04464f929a Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 5 Mar 2020 12:25:17 +0200 Subject: [PATCH] Remove temporary file lock at the end of the execution or in Task.close() --- trains/task.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/trains/task.py b/trains/task.py index 062f3065..035e681a 100644 --- a/trains/task.py +++ b/trains/task.py @@ -1455,6 +1455,14 @@ class Task(_Task): except Exception: # make sure we do not interrupt the exit process pass + # delete locking object (lock file) + # noinspection PyBroadException + if self._edit_lock: + try: + del self._edit_lock + except Exception: + pass + self._edit_lock = None @classmethod def __register_at_exit(cls, exit_callback, only_remove_signal_and_exception_hooks=False):