diff options
Diffstat (limited to 'elogv')
-rwxr-xr-x | elogv | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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 |