summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2020-07-21 10:41:47 +0200
committernicolargo <nicolas@nicolargo.com>2020-07-21 10:41:47 +0200
commit5fbbb3b2fe740bc3c9f0ea0c8af14060b7241483 (patch)
tree29f8176da23d5539db643fa25fd21f43a8abd3d0
parent51e00f23f3c1242755b2aae44613cf7282eb4b83 (diff)
Regex fix for hide conf key #1691
-rw-r--r--glances/plugins/glances_plugin.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/glances/plugins/glances_plugin.py b/glances/plugins/glances_plugin.py
index 91513903..936db58c 100644
--- a/glances/plugins/glances_plugin.py
+++ b/glances/plugins/glances_plugin.py
@@ -761,7 +761,9 @@ class GlancesPlugin(object):
hide=sda2,sda5,loop.*
"""
# TODO: possible optimisation: create a re.compile list
- return not all(j is None for j in [re.match(i, value.lower()) for i in self.get_conf_value('hide', header=header)])
+ # Old version (see issue #1691)
+ #return not all(j is None for j in [re.match(i, value.lower()) for i in self.get_conf_value('hide', header=header)])
+ return any(j for j in [re.match(i, value) for i in self.get_conf_value('hide', header=header)])
def has_alias(self, header):
"""Return the alias name for the relative header or None if nonexist."""