[checkmk-commits] Check_MK Git: check_mk: BI availability: fix two exceptions

Mathias Kettner mk at mathias-kettner.de
Wed Apr 23 15:11:27 CEST 2014


Module: check_mk
Branch: master
Commit: 3effcd547e70642ef601c606d970b696cd080d50
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3effcd547e70642ef601c606d970b696cd080d50

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Wed Apr 23 15:11:22 2014 +0200

BI availability: fix two exceptions

---

 web/plugins/views/availability.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/web/plugins/views/availability.py b/web/plugins/views/availability.py
index 601d313..badd942 100644
--- a/web/plugins/views/availability.py
+++ b/web/plugins/views/availability.py
@@ -1440,7 +1440,8 @@ def get_bi_timeline(tree, aggr_group, avoptions, timewarp):
 
     data = html.live.query(query)
     if not data:
-        raise MKGeneralException(_("No historical data available for this aggregation. Query was: <pre>%s</pre>") % query)
+        return [], None
+        # raise MKGeneralException(_("No historical data available for this aggregation. Query was: <pre>%s</pre>") % query)
 
     html.live.set_prepend_site(False)
     html.live.set_only_sites(None)
@@ -1549,7 +1550,7 @@ def compute_tree_state(tree, status):
             state_output[1],
             state_output[2], # in_downtime
             False, # acknowledged
-            services_by_host[site_host]
+            services_by_host.get(site_host,[])
         ]
 
 



More information about the checkmk-commits mailing list