mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-23 09:11:49 +03:00
Merge remote-tracking branch 'refs/remotes/origin/develop' into develop
Merging curses deltas
This commit is contained in:
commit
335029ce27
4
docs/_static/glances-flame.svg
vendored
4
docs/_static/glances-flame.svg
vendored
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 145 KiB |
@ -141,10 +141,19 @@ class _GlancesCurses(object):
|
||||
self.space_between_line = 2
|
||||
|
||||
# Init the curses screen
|
||||
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)
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user