From 07fca61572872c2b87636a5031b56b15706a4eb9 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Sun, 25 Apr 2021 10:39:10 +0300 Subject: [PATCH] Fix PyCharm debugger Keyboard interrupt set Task as failed (instead of aborted) --- clearml/task.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clearml/task.py b/clearml/task.py index e9d15f4d..3ad1a37d 100644 --- a/clearml/task.py +++ b/clearml/task.py @@ -2915,7 +2915,8 @@ class Task(_Task): pass # only if we have an exception (and not ctrl-break) or signal is not SIGTERM / SIGINT - if (is_exception and not isinstance(self.__exit_hook.exception, KeyboardInterrupt)) \ + if (is_exception and not isinstance(is_exception, KeyboardInterrupt) + and is_exception != KeyboardInterrupt) \ or (not self.__exit_hook.remote_user_aborted and self.__exit_hook.signal not in (None, 2, 15)): task_status = (