Module: check_mk
Branch: master
Commit: 894544069e907c770681dd8d3e6067854ecf2c6c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=894544069e907c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 25 16:15:43 2016 +0200
Favorite icon: Use generic per request cache instead of old hack
---
web/plugins/icons/builtin.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index 93ed044..3a78620 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -776,11 +776,10 @@ multisite_icons_and_actions['aggregations'] = {
# '----------------------------------------------------------------------'
def paint_stars(what, row, tags, host_custom_vars):
- try:
- stars = html.stars
- except:
+ stars = html.get_cached("stars")
+ if stars is None:
stars = set(config.load_user_file("favorites", []))
- html.stars = stars
+ html.set_cache("stars", stars)
if what == "host":
starred = row["host_name"] in stars