Support for monochrome (serial) terminals e.g. vt220 #1362

This commit is contained in:
nicolargo 2018-12-08 10:27:42 +01:00
parent e5439abe8b
commit 2653d5a0ba
2 changed files with 8 additions and 4 deletions

1
NEWS
View File

@ -19,6 +19,7 @@ Bugs corrected:
* Compare issue with Process.cpu_times() #1339
* ERROR -- Can not grab extended stats (invalid attr name 'num_fds') #1351
* Action on port/web plugins is not working #1358
* Support for monochrome (serial) terminals e.g. vt220 #1362
Others:

View File

@ -181,10 +181,13 @@ class _GlancesCurses(object):
"""Init the Curses color layout."""
# Set curses options
if hasattr(curses, 'start_color'):
curses.start_color()
if hasattr(curses, 'use_default_colors'):
curses.use_default_colors()
try:
if hasattr(curses, 'start_color'):
curses.start_color()
if hasattr(curses, 'use_default_colors'):
curses.use_default_colors()
except Exception as e:
logger.warning('Error initializing terminal color ({})'.format(e))
# Init colors
if self.args.disable_bold: