Sometimes depending on critical section during timeout, traceback could be printed to stderr. Stop that.

This commit is contained in:
Tim Savannah 2017-05-20 15:49:17 -04:00
parent b1a05fe92f
commit c3a114e1df

View File

@ -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