public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-portage/elogv/files: elogv-0.7.5-vt100.patch
@ 2013-05-02 21:43 Sebastian Pipping (sping)
  0 siblings, 0 replies; only message in thread
From: Sebastian Pipping (sping) @ 2013-05-02 21:43 UTC (permalink / raw
  To: gentoo-commits

sping       13/05/02 21:43:45

  Added:                elogv-0.7.5-vt100.patch
  Log:
  app-portage/elogv: Fix crash with TERM=vt100 (bug #467792)
  
  (Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key 0x401A1600)

Revision  Changes    Path
1.1                  app-portage/elogv/files/elogv-0.7.5-vt100.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/elogv/files/elogv-0.7.5-vt100.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/elogv/files/elogv-0.7.5-vt100.patch?rev=1.1&content-type=text/plain

Index: elogv-0.7.5-vt100.patch
===================================================================
From 68141bf6f469ed7618c7ebd068eb7f8db260dfdb Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Thu, 2 May 2013 23:22:36 +0200
Subject: [PATCH] Fix crash with TERM=vt100

---
 elogv | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/elogv b/elogv
index 53c37cd..a8440d1 100755
--- a/elogv
+++ b/elogv
@@ -96,12 +96,15 @@ class ElogViewer:
         self.screen = screen
 
         # Our color pairs
-        curses.use_default_colors()
-        curses.init_pair(selected, curses.COLOR_BLACK, curses.COLOR_WHITE)
-        curses.init_pair(einfo, curses.COLOR_GREEN, curses.COLOR_BLACK)
-        curses.init_pair(ewarn, curses.COLOR_YELLOW, curses.COLOR_BLACK)
-        curses.init_pair(eerror, curses.COLOR_RED, curses.COLOR_BLACK)
-        curses.init_pair(elog, curses.COLOR_MAGENTA, curses.COLOR_BLACK)
+        try:
+            curses.use_default_colors()
+            curses.init_pair(selected, curses.COLOR_BLACK, curses.COLOR_WHITE)
+            curses.init_pair(einfo, curses.COLOR_GREEN, curses.COLOR_BLACK)
+            curses.init_pair(ewarn, curses.COLOR_YELLOW, curses.COLOR_BLACK)
+            curses.init_pair(eerror, curses.COLOR_RED, curses.COLOR_BLACK)
+            curses.init_pair(elog, curses.COLOR_MAGENTA, curses.COLOR_BLACK)
+        except curses.error:  # e.g. with "TERM=vt100 elogv" invokation
+            pass
 
         # This attributes are used to manage the scrolling of the list
         # of files    
-- 
1.8.1.5






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-02 21:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 21:43 [gentoo-commits] gentoo-x86 commit in app-portage/elogv/files: elogv-0.7.5-vt100.patch Sebastian Pipping (sping)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox