Module: check_mk
Branch: master
Commit: 8ea14d9a7e557ce88472b1e7a82fd512853b4c82
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8ea14d9a7e557c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 27 09:44:06 2017 +0200
Global settings: Fixed exception related to new Livestatus TCP setting
(LIVESTATUS_TCP_ONLY_FROM)
Change-Id: I1baafd323351a40978afa565251d015630d83d18
---
web/htdocs/watolib.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 145bbed..3d76893 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -661,6 +661,9 @@ class ConfigDomainOMD(ConfigDomain):
}
del settings["LIVESTATUS_TCP_PORT"]
+ # Be compatible to older sites that don't have the key in their
config yet
+ settings.setdefault("LIVESTATUS_TCP_ONLY_FROM",
"0.0.0.0")
+
if settings["LIVESTATUS_TCP_ONLY_FROM"] !=
"0.0.0.0":
settings["LIVESTATUS_TCP"]["only_from"] =
settings["LIVESTATUS_TCP_ONLY_FROM"].split()