Module: check_mk
Branch: master
Commit: a0b0609dd56d9cdc0b9bcafdfaa2587d99f3b214
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a0b0609dd56d9c…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Wed Apr 13 11:03:51 2016 +0200
further bugfix to recent change on downtime buttons
---
web/plugins/views/commands.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/web/plugins/views/commands.py b/web/plugins/views/commands.py
index 8ffdf97..42bedf9 100644
--- a/web/plugins/views/commands.py
+++ b/web/plugins/views/commands.py
@@ -554,8 +554,12 @@ def command_downtime(cmdtag, spec, row):
_("<b>%s of %s length</b> on") %\
(title_start, get_duration_human_readable(duration))
- if rangebtns:
+ try:
rangebtn = rangebtns.next()
+ except StopIteration:
+ rangebtn = None
+
+ if rangebtn:
btnname, end = rangebtn.split("__", 1)
down_to, title = resolve_end(end)
elif html.var("_down_from_now"):