Don't print errors happened in thread
This commit is contained in:
parent
58214c0ac3
commit
4025d753e3
1 changed files with 4 additions and 0 deletions
|
@ -74,6 +74,10 @@ else:
|
||||||
importlib.reload(gevent)
|
importlib.reload(gevent)
|
||||||
|
|
||||||
def handleGreenletError(context, type, value, tb):
|
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):
|
if isinstance(value, str):
|
||||||
# Cython can raise errors where the value is a plain string
|
# Cython can raise errors where the value is a plain string
|
||||||
# e.g., AttributeError, "_semaphore.Semaphore has no attr", <traceback>
|
# e.g., AttributeError, "_semaphore.Semaphore has no attr", <traceback>
|
||||||
|
|
Loading…
Reference in a new issue