From b9af72ea11f0c6e1e8f90e3926b5b6be1a83f312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20H=C3=B6ger?= Date: Wed, 22 Feb 2012 21:50:46 +0100 Subject: [PATCH] Curses UI: Reset the warn method before terminate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Changelog.rst | 1 + offlineimap/ui/Curses.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Changelog.rst b/Changelog.rst index 664c7ca..89ced02 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -9,6 +9,7 @@ WIP (add new stuff for the next release) ======================================== * bump bundled imaplib2 library 2.29 --> 2.33 +* Curses UI, don't use colors after we shut down curses already (C.Höger) OfflineIMAP v6.5.3.1 (2012-04-03) ================================= diff --git a/offlineimap/ui/Curses.py b/offlineimap/ui/Curses.py index 7463a6a..1c378ab 100644 --- a/offlineimap/ui/Curses.py +++ b/offlineimap/ui/Curses.py @@ -613,6 +613,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)