Module: check_mk
Branch: master
Commit: 7cee259b6b810e7df9fe84949413a57525fa6c3d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7cee259b6b810e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 10 15:52:28 2012 +0100
FIX: do not use isdisjoint() (was in rule editor on Lenny)
---
ChangeLog | 1 +
web/htdocs/lib.py | 6 ++++++
web/htdocs/wato.py | 2 +-
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0b0bbce..ad9d2f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* FIX: fix bug in inventory in validate_datatype()
* Better output in case of inventory error
* FIX: fix bug in host_icon rule on non OMD
+ * FIX: do not use isdisjoint() (was in rule editor on Lenny)
Checks & Agents:
* hpux_if: fix missing default parameter errors
diff --git a/web/htdocs/lib.py b/web/htdocs/lib.py
index 0bc28e9..29736ff 100644
--- a/web/htdocs/lib.py
+++ b/web/htdocs/lib.py
@@ -194,3 +194,9 @@ def saveint(x):
return int(x)
except:
return 0
+
+def set_is_disjoint(a, b):
+ for elem in a:
+ if elem in b:
+ return False
+ return True
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a91b157..1156b75 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8396,7 +8396,7 @@ def mode_edit_ruleset(phase):
img = 'imatch'
else:
new_keys = set(value.keys())
- if match_keys.isdisjoint(new_keys):
+ if set_is_disjoint(match_keys, new_keys):
title = _("This rule matches and defines new
parameters.")
img = 'match'
elif new_keys.issubset(match_keys):