Module: check_mk
Branch: master
Commit: 27c5cc11bf24794a74b2124a6e1ab22dccde0c38
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=27c5cc11bf2479…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 27 09:40:52 2014 +0100
Make visuals deal correctly with not completely imported reporting module
---
web/htdocs/visuals.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index fbcc746..4dd059f 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -1151,6 +1151,9 @@ def collect_context_links_of(visual_type_name, this_visual,
active_filter_vars,
visual_type = visual_types[visual_type_name]
module_name = visual_type["module_name"]
thing_module = __import__(module_name)
+ load_func_name = 'load_%s'% visual_type_name
+ if load_func_name not in thing_module.__dict__:
+ return context_links # in case of exception in "reporting", the load
function might be missing
thing_module.__dict__['load_%s'% visual_type_name]()
available = thing_module.__dict__['permitted_%s' % visual_type_name]()