[PATCH] Reset the warn method before terminate

Christoph Höger christoph.hoeger at tu-berlin.de
Wed Feb 22 20:50:46 UTC 2012


The warn() method tries to set the color to red. This leads to a garbled
tty after endwin() has been called. So lets simply use the UIBase
implementation.

Signed-off-by: Christoph Höger <christoph.hoeger at tu-berlin.de>
---
  offlineimap/ui/Curses.py |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/offlineimap/ui/Curses.py b/offlineimap/ui/Curses.py
index af41d35..682c09d 100644
--- a/offlineimap/ui/Curses.py
+++ b/offlineimap/ui/Curses.py
@@ -614,6 +614,8 @@ class Blinkenlights(UIBase, CursesUtil):
          # basic one, so exceptions and stuff are properly displayed
          self.logger.removeHandler(self._log_con_handler)
          UIBase.setup_consolehandler(self)
+        # reset the warning method, we do not have curses anymore
+        self.warn = super(Blinkenlights, self).warn
          # finally call parent terminate which prints out exceptions etc
          super(Blinkenlights, self).terminate(*args, **kwargs)
  -- 1.7.7.6




More information about the OfflineIMAP-project mailing list