Avoid crashing in atexit.
This commit is contained in:
parent
1cb7700136
commit
87d59ae13b
@ -82,6 +82,9 @@ class StderrCatcher:
|
|||||||
_log_writer.write(STDERR_LEVEL, txt)
|
_log_writer.write(STDERR_LEVEL, txt)
|
||||||
sys.__stderr__.write(txt)
|
sys.__stderr__.write(txt)
|
||||||
|
|
||||||
|
def flush(self):
|
||||||
|
sys.__stderr__.flush()
|
||||||
|
|
||||||
def __exception_handler(typ, exc, tb):
|
def __exception_handler(typ, exc, tb):
|
||||||
trace = StringIO()
|
trace = StringIO()
|
||||||
traceback.print_exception(typ, exc, tb, None, trace)
|
traceback.print_exception(typ, exc, tb, None, trace)
|
||||||
|
Loading…
Reference in New Issue
Block a user