mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-24 05:15:47 +03:00
Minor update
This commit is contained in:
parent
a29d7123ae
commit
4a4e711212
@ -25,15 +25,21 @@ import sys
|
|||||||
import signal
|
import signal
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
import statgrab
|
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
|
||||||
|
try:
|
||||||
|
import statgrab
|
||||||
|
except:
|
||||||
|
print 'Statgrab initialization failed, Glances cannot start.'
|
||||||
|
print ''
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import curses
|
import curses
|
||||||
import curses.panel
|
import curses.panel
|
||||||
except:
|
except:
|
||||||
print 'Textmode GUI initialization failed, Glances cannot start.'
|
print 'Curses initialization failed, Glances cannot start.'
|
||||||
print
|
print ''
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Globals variables
|
# Globals variables
|
||||||
@ -130,8 +136,11 @@ class glancesStats():
|
|||||||
if not statgrab.sg_init():
|
if not statgrab.sg_init():
|
||||||
print "Error: Can not init the libstatgrab library.\n"
|
print "Error: Can not init the libstatgrab library.\n"
|
||||||
|
|
||||||
# Init the interfac fs stats
|
# Init the fs stats
|
||||||
|
try:
|
||||||
self.glancesgrabfs = glancesGrabFs()
|
self.glancesgrabfs = glancesGrabFs()
|
||||||
|
except:
|
||||||
|
self.glancesgrabfs = {}
|
||||||
|
|
||||||
# Do the first update
|
# Do the first update
|
||||||
self.__update__()
|
self.__update__()
|
||||||
|
Loading…
Reference in New Issue
Block a user