From 87d59ae13b75b4b364aa1e3ae39b252cdc173188 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 22 May 2007 18:24:56 +0200 Subject: [PATCH] Avoid crashing in atexit. --- sugar/logger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sugar/logger.py b/sugar/logger.py index d6b6d43d..fa2e28fb 100644 --- a/sugar/logger.py +++ b/sugar/logger.py @@ -82,6 +82,9 @@ class StderrCatcher: _log_writer.write(STDERR_LEVEL, txt) sys.__stderr__.write(txt) + def flush(self): + sys.__stderr__.flush() + def __exception_handler(typ, exc, tb): trace = StringIO() traceback.print_exception(typ, exc, tb, None, trace)