diff options
author | Nicolargo <nicolas@nicolargo.com> | 2014-06-18 22:27:25 +0200 |
---|---|---|
committer | Nicolargo <nicolas@nicolargo.com> | 2014-06-18 22:27:25 +0200 |
commit | 0cad93d31aab405b47a815b9b71b24201036d93b (patch) | |
tree | 2a531523731a78ced4102fe88794a5139fc88d52 | |
parent | 63e8d5a367ed0617dd041fe7f061ad624ab6c391 (diff) | |
parent | 58c34d70446260e37511f7cee3ecd301c31ed566 (diff) |
Merge branch 'hotfix/issue378'
-rw-r--r-- | glances/core/glances_monitor_list.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/glances/core/glances_monitor_list.py b/glances/core/glances_monitor_list.py index d3329407..08fc4286 100644 --- a/glances/core/glances_monitor_list.py +++ b/glances/core/glances_monitor_list.py @@ -78,7 +78,12 @@ class MonitorList(object): if description is not None and regex is not None: # Build the new item value["description"] = description - value["regex"] = regex + try: + re.compile(regex) + except: + continue + else: + value["regex"] = regex value["command"] = command value["countmin"] = countmin value["countmax"] = countmax |