Module: check_mk
Branch: master
Commit: af1cb0f2b0a9e825522e856acb6bb2d1970994df
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=af1cb0f2b0a9e8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 23 14:53:10 2016 +0100
4223 FIX Fixed possible g_host_attribute related AttributeError exception
Change-Id: Id1c2d3b7003e2287f6020adafaf2d86792a25a63
---
.werks/4223 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 20 +++++++++++---------
3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/.werks/4223 b/.werks/4223
new file mode 100644
index 0000000..fd6b9b4
--- /dev/null
+++ b/.werks/4223
@@ -0,0 +1,9 @@
+Title: Fixed possible g_host_attribute related AttributeError exception
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.4.0i4
+Date: 1482501180
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 03819ee..2d77605 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,6 +34,7 @@
* 4218 FIX: Disabling replication with a site did not clear the changes for this site
(1.4.0i3 regression)
* 4221 FIX: Fixed "analyse parameters" page for services with umlauts in
names
* 4222 FIX: Services of host page: Fixed encoding issue for hosts with umlauts in
alias
+ * 4223 FIX: Fixed possible g_host_attribute related AttributeError exception
Notifications:
* 4197 FIX: Fix sending notification to global fallback email address
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index cc67dcb..6b88730 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -68,6 +68,17 @@ automation_commands = {}
g_rulespecs = None
g_rulegroups = {}
+# Global datastructure holding all attributes (in a defined order)
+# as pairs of (attr, topic). Topic is the title under which the
+# attribute is being displayed. All builtin attributes use the
+# topic None. As long as only one topic is used, no topics will
+# be displayed. They are useful if you have a great number of
+# custom attributes.
+g_host_attributes = []
+
+# Dictionary for quick access
+g_host_attribute = {}
+
def initialize_before_loading_plugins():
if g_rulespecs:
g_rulespecs.clear()
@@ -2951,16 +2962,7 @@ class ContactGroupsAttribute(Attribute):
def initialize_host_attribute_structures():
global g_host_attributes, g_host_attribute
-
- # Global datastructure holding all attributes (in a defined order)
- # as pairs of (attr, topic). Topic is the title under which the
- # attribute is being displayed. All builtin attributes use the
- # topic None. As long as only one topic is used, no topics will
- # be displayed. They are useful if you have a great number of
- # custom attributes.
g_host_attributes = []
-
- # Dictionary for quick access
g_host_attribute = {}