From ab263bb59fe3eb80e3cd569e1f97d43cd29ccebf Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 9 Apr 2020 13:06:06 +0300 Subject: [PATCH] Raise ValueError if Task.get_logger() is called after task was closed --- trains/task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trains/task.py b/trains/task.py index 900e2ada..2071628e 100644 --- a/trains/task.py +++ b/trains/task.py @@ -1216,7 +1216,7 @@ class Task(_Task): # do not recreate logger after task was closed/quit if self._at_exit_called: - return None + raise ValueError("Cannot use Task Logger after task was closed") if not self._logger: # force update of base logger to this current task (this is the main logger task)