Merge remote-tracking branch 'refs/remotes/origin/develop' into develop

Merging curses deltas
This commit is contained in:
Christoph Zimmermann 2023-10-29 14:53:21 +01:00
commit 335029ce27
3 changed files with 19 additions and 6 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 145 KiB

View File

@ -141,10 +141,19 @@ class _GlancesCurses(object):
self.space_between_line = 2
# Init the curses screen
self.screen = curses.initscr()
if not self.screen:
logger.critical("Cannot init the curses library.\n")
sys.exit(1)
try:
self.screen = curses.initscr()
if not self.screen:
logger.critical("Cannot init the curses library.\n")
sys.exit(1)
except Exception as e:
if args.export:
logger.info("Cannot init the curses library, quiet mode on and export.")
args.quiet = True
return
else:
logger.critical("Cannot init the curses library ({})".format(e))
sys.exit(1)
# Load the 'outputs' section of the configuration file
# - Init the theme (default is black)

View File

@ -105,6 +105,10 @@ class GlancesStandalone(object):
# Init screen
self.screen = GlancesCursesStandalone(config=config, args=args)
# If an error occur during the screen init, continue if export option is set
# It is done in the screen.init function
self._quiet = args.quiet
# Check the latest Glances version
self.outdated = Outdated(config=config, args=args)