Merge branch '0.10' into 0.11

pull/2019/merge
sebres 2017-12-06 01:41:29 +01:00
commit 2179db3692
1 changed files with 7 additions and 2 deletions

View File

@ -67,8 +67,13 @@ class JailThread(Thread):
def run_with_except_hook(*args, **kwargs):
try:
run(*args, **kwargs)
except:
excepthook(*sys.exc_info())
except Exception as e:
# avoid very sporadic error "'NoneType' object has no attribute 'exc_info'" (https://bugs.python.org/issue7336)
# only extremely fast systems are affected ATM (2.7 / 3.x), if thread ends nothing is available here.
if sys is not None:
excepthook(*sys.exc_info())
else:
print(e)
self.run = run_with_except_hook
@abstractmethod