Module: check_mk
Branch: master
Commit: ffbca8afde75b8f27cdabf278102c5b15c2a2dd5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ffbca8afde75b8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Aug 26 14:12:55 2015 +0200
Fixed exception during creating hosts when having an empty sites.mk
---
web/htdocs/wato.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 9a21f2a..dd744c0 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -11112,7 +11112,14 @@ def load_sites():
site['disabled'] = True
del site['socket']
- return vars["sites"]
+ if not vars["sites"]:
+ # There seem to be installations out there which have a sites.mk
+ # which has an empty sites dictionary. Apply the default configuration
+ # for these sites too.
+ return config.default_single_site_configuration()
+ else:
+ return vars["sites"]
+
except Exception, e:
if config.debug: