diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-05-22 16:24:56 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-05-22 16:24:56 (GMT) |
commit | 87d59ae13b75b4b364aa1e3ae39b252cdc173188 (patch) | |
tree | 02c8c3c3f415eef5d7ba0ac227be03c745f243a7 /sugar | |
parent | 1cb7700136e302ec0626f3f64f43248c8fb56a06 (diff) |
Avoid crashing in atexit.
Diffstat (limited to 'sugar')
-rw-r--r-- | sugar/logger.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sugar/logger.py b/sugar/logger.py index d6b6d43..fa2e28f 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) |