summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2017-07-24 08:48:31 +0200
committernicolargo <nicolas@nicolargo.com>2017-07-24 08:48:31 +0200
commitca563cac7a403843ea3040ca1bcb94e50581d887 (patch)
tree4fe7176e4ef4b7abdcdfa7284a4d1176db367962
parent86c7b1339d9a7589fe5e58b89fab9addd48e3a99 (diff)
parent4478faf984c4c2c23184ac18a7b8eaf5525d5609 (diff)
Merge branch 'issue1126' into develop
-rw-r--r--NEWS1
-rw-r--r--glances/plugins/glances_plugin.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index f1f95761..28afca9d 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Bugs corrected:
* GPU plugin. <class 'TypeError'>: ... not JSON serializable"> (issue #1112)
* PermissionError on macOS (issue #1120)
* Cant move up or down in glances --browser (issue #1113)
+ * Unable to give aliases to or hide network interfaces and disks (issue #1126)
Installation:
diff --git a/glances/plugins/glances_plugin.py b/glances/plugins/glances_plugin.py
index 98bec585..ffeb7a17 100644
--- a/glances/plugins/glances_plugin.py
+++ b/glances/plugins/glances_plugin.py
@@ -722,13 +722,15 @@ 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) for i in self.get_conf_value('hide', header=header)])
+ return not all(j is None for j in [re.match(i, value.lower()) 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."""
try:
- return self._limits[self.plugin_name + '_' + header + '_' + 'alias'][0]
+ # Force to lower case (issue #1126)
+ return self._limits[self.plugin_name + '_' + header.lower() + '_' + 'alias'][0]
except (KeyError, IndexError):
+ # logger.debug("No alias found for {}".format(header))
return None
def msg_curse(self, args=None, max_width=None):