try-except around failing psutil.net_io_counters
Apparently this can fail unexpectedly.
@@ -53,7 +53,11 @@ class SystemMonitor(object):
'count': self.count}
if self._collect_net_io_counters:
+ try:
ioc = psutil.net_io_counters()
+ except Exception:
+ pass
+ else:
last = self._last_io_counters
duration = now - self.last_time
read_bytes = (ioc.bytes_recv - last.bytes_recv) / (duration or 0.5)
