mirror of
https://github.com/nicolargo/glances.git
synced 2026-03-15 12:27:24 -04:00
Init stats on error
This commit is contained in:
@@ -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)):
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user