Avoid crashing in atexit.

This commit is contained in:
Tomeu Vizoso 2007-05-22 18:24:56 +02:00
parent 1cb7700136
commit 87d59ae13b

View File

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