diff options
author | nicolargo <nicolas@nicolargo.com> | 2018-11-06 21:08:49 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2018-11-06 21:08:49 +0100 |
commit | 22db708dcebc367881841811fc3b8212d3e4bfc4 (patch) | |
tree | ca0d5cde1f7fa1398e7ad499e9a3d1b36a75d3ab /glances/plugins/glances_network.py | |
parent | 96a05bec739a2dbc236e131d4f3cb97a6b947242 (diff) |
KeyError: 'eth0' when interface is not connected #1348
Diffstat (limited to 'glances/plugins/glances_network.py')
-rw-r--r-- | glances/plugins/glances_network.py | 3 |
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 |