Sometimes depending on critical section during timeout, traceback could be printed to stderr. Stop that.
This commit is contained in:
parent
b1a05fe92f
commit
c3a114e1df
@ -61,6 +61,9 @@ def func_timeout(timeout, func, args=(), kwargs=None):
|
||||
def funcwrap(args2, kwargs2):
|
||||
try:
|
||||
ret.append( func(*args2, **kwargs2) )
|
||||
except FunctionTimedOut:
|
||||
# Don't print traceback to stderr if we time out
|
||||
pass
|
||||
except Exception as e:
|
||||
if isStopped is False:
|
||||
# Don't capture stopping exception
|
||||
|
||||
Loading…
Reference in New Issue
Block a user