Module: check_mk
Branch: master
Commit: c7cf2fa7c666541468238f34fa2f2bbda9a02dbb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c7cf2fa7c66654…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 28 11:41:16 2017 +0100
4403 FIX Fixed problem on diagnose page for distributed hosts
An error "KeyError: '_state' could be shown in the "Ping" state
container
of the host diagnose page.
Change-Id: Ibd81abf324391863812ae45975346e9cf8315a71
---
.werks/4403 | 11 +++++++++++
web/htdocs/watolib.py | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/4403 b/.werks/4403
new file mode 100644
index 0000000..f6141e8
--- /dev/null
+++ b/.werks/4403
@@ -0,0 +1,11 @@
+Title: Fixed problem on diagnose page for distributed hosts
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1488278389
+Class: fix
+
+An error "KeyError: '_state' could be shown in the "Ping" state
container
+of the host diagnose page.
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 16f5a59..06ae353 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -3533,7 +3533,7 @@ def sync_changes_before_remote_automation(site_id):
timeout -= 0.5
state = manager.get_site_state(site_id)
- if state["_state"] != "success":
+ if state and state["_state"] != "success":
logger.error(_("Remote automation tried to sync pending changes but failed:
%s") %
state.get("_status_details"))