From 91955f16ff6e45c7f5f7edac2526bb5d8fdba71e Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Fri, 6 Jul 2007 18:24:38 +0200 Subject: [PATCH] Add flush method. --- sugar/logger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sugar/logger.py b/sugar/logger.py index a9042a02..3676c565 100644 --- a/sugar/logger.py +++ b/sugar/logger.py @@ -78,6 +78,9 @@ class StdoutCatcher: _log_writer.write(STDOUT_LEVEL, txt) sys.__stdout__.write(txt) + def flush(self): + sys.__stderr__.flush() + class StderrCatcher: def write(self, txt): _log_writer.write(STDERR_LEVEL, txt)