Init stats on error

This commit is contained in:
Nicolargo
2014-04-26 20:12:21 +02:00
parent 7ce0383eae
commit bc26e37dfb
2 changed files with 4 additions and 2 deletions

View File

@@ -49,7 +49,8 @@ class glancesGrabFs:
try:
fs_stat = psutil.disk_partitions(all=False)
except UnicodeDecodeError:
return []
self.stats = []
return self.stats
# Loop over fs
for fs in range(len(fs_stat)):

View File

@@ -60,7 +60,8 @@ class Plugin(GlancesPlugin):
try:
netiocounters = psutil.net_io_counters(pernic=True)
except UnicodeDecodeError:
return []
self.stats = []
return self.stats
# Previous network interface stats are stored in the network_old variable
network = []