def __init__(self, threading_support=False, *args, **kwargs):
''' Optional arguments:
threading_support - Support the threading module and patch a bug
preventing catching exceptions in other threads.
See add_threading_excepthook for more info. Only
neccesary if you want to catch exceptions not on
the main thread. This is only patched after
__enter__ unpatched at __exit__
All other args from db_stop_if_error()'''
self.threading_support=threading_support
super(DbStopIfError, self).__init__(*args, **kwargs)
#This is all needed JUST for threading. It uses syshook instead of __exit__
评论列表
文章目录