Module: check_mk
Branch: master
Commit: d03866143756dcb858eff6367f922ae8b3ae4106
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d03866143756dc…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Tue Jan 22 10:06:19 2019 +0100
mk_jolokia: fix broken cache function
Change-Id: I4ffeede78e42840de71b0c5f9f898b260039b8fa
---
agents/plugins/mk_jolokia.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/agents/plugins/mk_jolokia.py b/agents/plugins/mk_jolokia.py
index b80df80..ff068d0 100755
--- a/agents/plugins/mk_jolokia.py
+++ b/agents/plugins/mk_jolokia.py
@@ -240,10 +240,11 @@ def cached(function):
cache = {}
def cached_function(*args):
+ key = repr(args)
try:
- return cache[args]
+ return cache[key]
except KeyError:
- return cache.setdefault(args, function(*args))
+ return cache.setdefault(key, function(*args))
return cached_function