From 042a5cd235f36f118a567c9841d3376924eff0e6 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sun, 13 Dec 2020 22:20:53 +0100 Subject: [PATCH] Correct issue with #1767 --- glances/plugins/glances_memswap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glances/plugins/glances_memswap.py b/glances/plugins/glances_memswap.py index 6fa22148..87d1fb38 100644 --- a/glances/plugins/glances_memswap.py +++ b/glances/plugins/glances_memswap.py @@ -139,7 +139,8 @@ class Plugin(GlancesPlugin): # Add specifics informations # Alert and log - self.views['used']['decoration'] = self.get_alert_log(self.stats['used'], maximum=self.stats['total']) + if 'used' in self.stats and 'total' in self.stats: + self.views['used']['decoration'] = self.get_alert_log(self.stats['used'], maximum=self.stats['total']) def msg_curse(self, args=None, max_width=None): """Return the dict to display in the curse interface."""