Module: check_mk
Branch: master
Commit: 4e3455422943db3c7540a1d912d2fe5667e8a471
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4e3455422943db…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 11 08:32:15 2013 +0200
Fixed error when disabling the livestatus connection for a remote site via config
---
web/htdocs/config.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/config.py b/web/htdocs/config.py
index 29ef0ed..b0ec771 100644
--- a/web/htdocs/config.py
+++ b/web/htdocs/config.py
@@ -385,7 +385,8 @@ def sitenames():
def allsites():
return dict( [(name, site(name))
for name in sitenames()
- if not site(name).get("disabled", False)] )
+ if not site(name).get("disabled", False)
+ and site(name)['socket'] != 'disabled' ] )
def site(name):
s = sites.get(name, {})
@@ -405,6 +406,8 @@ def site_is_local(name):
sock = s.get("socket")
return not sock or sock == "unix:" + defaults.livestatus_unix_socket
+# FIXME: Should this return True even if all sites but one are disabled?
+# -> should we use allsites() instead of "sites" directly?
def is_multisite():
if len(sites) > 1:
return True