summaryrefslogtreecommitdiffstats
path: root/glances/plugins/glances_connections.py
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2023-05-17 11:18:37 +0200
committernicolargo <nicolas@nicolargo.com>2023-05-17 11:18:37 +0200
commit230c2fe437fe27066926102798df9304931d31e3 (patch)
treefe7d5934f444780845c7d438a7527ee2cb721f82 /glances/plugins/glances_connections.py
parent10b5c203d00f440377231e629a044c0970435a07 (diff)
3.4.0 crash on startupwith minimal deps #2401
Diffstat (limited to 'glances/plugins/glances_connections.py')
-rw-r--r--glances/plugins/glances_connections.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/glances/plugins/glances_connections.py b/glances/plugins/glances_connections.py
index 5047a2af..27976bb8 100644
--- a/glances/plugins/glances_connections.py
+++ b/glances/plugins/glances_connections.py
@@ -158,7 +158,9 @@ class Plugin(GlancesPlugin):
msg = '{:>{width}}'.format(self.stats[s], width=max_width - len(s) + 2)
ret.append(self.curse_add_line(msg))
# Connections track
- if self.stats['nf_conntrack_enabled']:
+ if self.stats['nf_conntrack_enabled'] and \
+ 'nf_conntrack_count' in self.stats and \
+ 'nf_conntrack_max' in self.stats:
s = 'Tracked'
ret.append(self.curse_new_line())
msg = '{:{width}}'.format(nativestr(s).capitalize(), width=len(s))