Module: check_mk
Branch: master
Commit: 7d2526ef7ec662cefcadfb3a8678ee0a58b98b61
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7d2526ef7ec662…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Wed Aug 26 16:58:57 2015 +0200
bugfix: access to undefined variable
---
web/htdocs/prediction.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/prediction.py b/web/htdocs/prediction.py
index 26a0640..c19f2c2 100644
--- a/web/htdocs/prediction.py
+++ b/web/htdocs/prediction.py
@@ -83,13 +83,14 @@ def page_graph():
tg_name = tg_info["name"]
timegroups.sort(cmp = lambda a,b: cmp(a["range"][0],
b["range"][0]))
- if not timegroup:
- timegroup = timegroups[0]
- tg_name = choices[0][0]
choices = [ (tg_info["name"], tg_info["name"].title())
for tg_info in timegroups ]
+ if not timegroup:
+ timegroup = timegroups[0]
+ tg_name = choices[0][0]
+
html.begin_form("prediction")
html.write(_("Show prediction for "))
html.select("timegroup", choices, tg_name,
onchange="document.prediction.submit();")