aboutsummaryrefslogtreecommitdiff
path: root/elogv
diff options
context:
space:
mode:
Diffstat (limited to 'elogv')
-rwxr-xr-xelogv15
1 files changed, 9 insertions, 6 deletions
diff --git a/elogv b/elogv
index 0ee01bc..2cdc086 100755
--- a/elogv
+++ b/elogv
@@ -104,12 +104,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