Module: check_mk
Branch: master
Commit: 986eda7711a02b88312eb98933b2668af682f83b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=986eda7711a02b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Sep 17 18:18:04 2013 +0200
FIX: fix exception and loss of hosts in a folder when deleting all site connections
---
ChangeLog | 2 ++
web/htdocs/wato.py | 5 ++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index a2b71c0..89e985e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -378,6 +378,8 @@
* FIX: fix logwatch pattern analyzer message "The host xyz is not
managed by WATO." after direct access via snapin
* FIX: Fixed first toggle of flags in global settings when default is set to True
+ * FIX: fix exception and loss of hosts in a folder when deleting all site
connections
+ of a distributed WATO setup
Event Console:
* FIX: apply rewriting of application/hostname also when cancelling events
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index cbbd96f..d3f409a 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7417,7 +7417,10 @@ def default_site():
if not "socket" in site \
or site["socket"] == "unix:" +
defaults.livestatus_unix_socket:
return id
- return config.sites.keys()[0]
+ try:
+ return config.sites.keys()[0]
+ except:
+ return None
class SiteAttribute(Attribute):
def __init__(self):