Some terminals may not support use_default_colors or curs_set and throw
an exception at us. Seen with serial consoles. However, the stats
command can still work if they fail, so ignore those errors.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
def main(stdscr, cell, stats_names):
- curses.use_default_colors()
+ try:
+ curses.use_default_colors()
+ curses.curs_set(0)
+ except curses.error:
+ pass
curses.noecho()
- curses.curs_set(0)
curses.halfdelay(10)
value = dict.fromkeys(stats_names)
old_value = dict.fromkeys(stats_names, None)