mirror of https://github.com/nicolargo/glances
Merge branch '2589-error-using-glances-export-to-influxdb2' into develop
commit
091e4975ca
|
@ -139,10 +139,19 @@ class _GlancesCurses(object):
|
||||||
self.space_between_line = 2
|
self.space_between_line = 2
|
||||||
|
|
||||||
# Init the curses screen
|
# Init the curses screen
|
||||||
|
try:
|
||||||
self.screen = curses.initscr()
|
self.screen = curses.initscr()
|
||||||
if not self.screen:
|
if not self.screen:
|
||||||
logger.critical("Cannot init the curses library.\n")
|
logger.critical("Cannot init the curses library.\n")
|
||||||
sys.exit(1)
|
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
|
# Load the 'outputs' section of the configuration file
|
||||||
# - Init the theme (default is black)
|
# - Init the theme (default is black)
|
||||||
|
|
|
@ -105,6 +105,10 @@ class GlancesStandalone(object):
|
||||||
# Init screen
|
# Init screen
|
||||||
self.screen = GlancesCursesStandalone(config=config, args=args)
|
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
|
# Check the latest Glances version
|
||||||
self.outdated = Outdated(config=config, args=args)
|
self.outdated = Outdated(config=config, args=args)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue