Add control on psutil.net_io_counters / Bug on some Debian distrib

This commit is contained in:
Nicolas Hennion
2013-08-20 14:53:44 +02:00
parent 9eb0b56f15
commit f0185fb04b

View File

@@ -1391,10 +1391,16 @@ class GlancesStats:
if psutil_net_io_counters:
# psutil >= 1.0.0
get_net_io_counters = psutil.net_io_counters(pernic=True)
try:
get_net_io_counters = psutil.net_io_counters(pernic=True)
except IOError:
self.network_error_tag = True
else:
# psutil < 1.0.0
get_net_io_counters = psutil.network_io_counters(pernic=True)
try:
get_net_io_counters = psutil.network_io_counters(pernic=True)
except IOError:
self.network_error_tag = True
if not hasattr(self, 'network_old'):
try: