Module: check_mk
Branch: master
Commit: 7e0184a7d584f5935f8adbdcf863748f8e4fd7a6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7e0184a7d584f5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jul 8 13:46:17 2013 +0200
WATO rule icon: fix case where there is no item
---
web/htdocs/wato.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index c475d1f..4746507 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -10080,7 +10080,10 @@ def mode_edit_ruleset(phase):
descr_pattern =
checks[check_command]["service_description"].replace("%s",
"(.*)")
matcher = re.search(descr_pattern,
html.var("service_description"))
if matcher:
- item = matcher.group(1)
+ try:
+ item = matcher.group(1)
+ except:
+ item = None
elif check_command.startswith("check_mk_active-"):
check_command = check_command[16:].split(" ")[0][:-1]
varname = "active_checks:" + check_command