From 4025d753e3bd8c98109ea4ab1534989e45a5df81 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Tue, 19 Nov 2019 02:16:44 +0100 Subject: [PATCH] Don't print errors happened in thread --- src/Debug/DebugHook.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Debug/DebugHook.py b/src/Debug/DebugHook.py index ce531df4..d100a3b8 100644 --- a/src/Debug/DebugHook.py +++ b/src/Debug/DebugHook.py @@ -74,6 +74,10 @@ else: importlib.reload(gevent) def handleGreenletError(context, type, value, tb): + if context.__class__ is tuple and context[0].__class__.__name__ == "ThreadPool": + # Exceptions in ThreadPool will be handled in the main Thread + return None + if isinstance(value, str): # Cython can raise errors where the value is a plain string # e.g., AttributeError, "_semaphore.Semaphore has no attr",