Module: check_mk
Branch: master
Commit: ba9755d899ea4f0087196e4076c68cd599aa7e6d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba9755d899ea4f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Oct 25 15:23:32 2016 +0200
Fixed using in_binary_hostlist cache
---
modules/check_mk.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 259f31d..564ada8 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -821,10 +821,14 @@ def host_extra_conf_merged(hostname, conf):
def in_binary_hostlist(hostname, conf):
- # TODO: This cache is never used. And now?
cache = cmk_base.config_cache.get_dict("in_binary_hostlist")
cache_id = id(conf), hostname
+ try:
+ return cache[cache_id]
+ except KeyError:
+ pass
+
# if we have just a list of strings just take it as list of hostnames
if conf and type(conf[0]) == str:
result = hostname in conf