Curses UI: Reset the warn method before terminate

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@tu-berlin.de>
This commit is contained in:
Christoph Höger 2012-02-22 21:50:46 +01:00 committed by Sebastian Spaeth
parent d079e614ea
commit b9af72ea11
2 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,7 @@ WIP (add new stuff for the next release)
======================================== ========================================
* bump bundled imaplib2 library 2.29 --> 2.33 * 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) OfflineIMAP v6.5.3.1 (2012-04-03)
================================= =================================

View File

@ -613,6 +613,8 @@ class Blinkenlights(UIBase, CursesUtil):
# basic one, so exceptions and stuff are properly displayed # basic one, so exceptions and stuff are properly displayed
self.logger.removeHandler(self._log_con_handler) self.logger.removeHandler(self._log_con_handler)
UIBase.setup_consolehandler(self) 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 # finally call parent terminate which prints out exceptions etc
super(Blinkenlights, self).terminate(*args, **kwargs) super(Blinkenlights, self).terminate(*args, **kwargs)