summaryrefslogtreecommitdiffstats
path: root/glances/plugins/glances_network.py
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2018-11-06 21:08:49 +0100
committernicolargo <nicolas@nicolargo.com>2018-11-06 21:08:49 +0100
commit22db708dcebc367881841811fc3b8212d3e4bfc4 (patch)
treeca0d5cde1f7fa1398e7ad499e9a3d1b36a75d3ab /glances/plugins/glances_network.py
parent96a05bec739a2dbc236e131d4f3cb97a6b947242 (diff)
KeyError: 'eth0' when interface is not connected #1348
Diffstat (limited to 'glances/plugins/glances_network.py')
-rw-r--r--glances/plugins/glances_network.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/glances/plugins/glances_network.py b/glances/plugins/glances_network.py
index b51b4d26..a7e31fd9 100644
--- a/glances/plugins/glances_network.py
+++ b/glances/plugins/glances_network.py
@@ -108,7 +108,8 @@ class Plugin(GlancesPlugin):
network_new = netiocounters
for net in network_new:
# Do not take hidden interface into account
- if self.is_hide(net):
+ # or KeyError: 'eth0' when interface is not connected #1348
+ if self.is_hide(net) or net not in netstatus:
continue
try:
cumulative_rx = network_new[net].bytes_recv