diff options
author | nicolargo <nicolas@nicolargo.com> | 2022-08-27 11:23:00 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2022-08-27 11:23:00 +0200 |
commit | 1bed69bc8a26463ee837382b7deeee328e6d3718 (patch) | |
tree | cf65933b83739fc71c53f20ad3ce95e0ed6c92c1 | |
parent | ef9917a9a85c897db055c988244bf03a0c3231b3 (diff) |
Make the hide function in sensors section compliant with lower/upercase #1590
-rw-r--r-- | glances/plugins/glances_plugin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glances/plugins/glances_plugin.py b/glances/plugins/glances_plugin.py index 65d38d76..03a4b74b 100644 --- a/glances/plugins/glances_plugin.py +++ b/glances/plugins/glances_plugin.py @@ -831,7 +831,7 @@ class GlancesPlugin(object): show=sda.* """ # @TODO: possible optimisation: create a re.compile list - return any(j for j in [re.match(i, value) for i in self.get_conf_value('show', header=header)]) + return any(j for j in [re.match(i.lower(), value.lower()) for i in self.get_conf_value('show', header=header)]) def is_hide(self, value, header=""): """Return True if the value is in the hide configuration list. @@ -842,7 +842,7 @@ class GlancesPlugin(object): hide=sda2,sda5,loop.* """ # @TODO: possible optimisation: create a re.compile list - return any(j for j in [re.match(i, value) for i in self.get_conf_value('hide', header=header)]) + return any(j for j in [re.match(i.lower(), value.lower()) for i in self.get_conf_value('hide', header=header)]) def is_display(self, value, header=""): """Return True if the value should be displayed in the UI""" |