Module: check_mk
Branch: master
Commit: ea2d51ac0c92c5d3b5a98569bce7c22c48a7989a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ea2d51ac0c92c5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Nov 29 10:12:13 2010 +0100
wato: fix problem with empty extra_service_conf
---
web/htdocs/wato.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 0d5b6b3..fefad41 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -551,6 +551,8 @@ def write_configuration_file():
out.write("\n")
# all WATO information to Check_MK's inventory checks (needed for link in
Multisite)
+ out.write("\n\nif '_WATO' not in extra_service_conf:\n"
+ " extra_service_conf['_WATO'] = []\n")
out.write("\nextra_service_conf['_WATO'] += [ \n"
" ('%s', [ 'wato', '%s' ], ALL_HOSTS, [
'Check_MK inventory' ] ) ]\n" % (g_filename, g_filename))
@@ -573,6 +575,7 @@ def check_filename():
if fn == filename:
title = t
break
+
if not title:
raise MKGeneralException("No config file <tt>%s</tt> is declared
in <tt>multisite.mk</tt>" % filename)