[PATCH] Reset the warn method before terminate

Christoph Höger christoph.hoeger at tu-berlin.de
Mon Feb 27 07:42:25 GMT 2012


This is just a reminder. Do you plan to apply this patch or do I need to 
change something or shall I only distribute it with the fedora rpm?

On 22.02.2012 21:50, Christoph Höger wrote:
> 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
>
>
> _______________________________________________
> OfflineIMAP-project mailing list
> OfflineIMAP-project at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
>
> OfflineIMAP homepage: http://software.complete.org/offlineimap


-- 
Christoph Höger

Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen

Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin

Tel.: +49 (30) 314-24890
E-Mail: christoph.hoeger at tu-berlin.de




More information about the OfflineIMAP-project mailing list