Module: check_mk
Branch: master
Commit: 3bc2f19930372c0b7218abf84d2bb6f83b20ab8a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3bc2f19930372c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Nov 6 22:26:43 2010 +0100
Fixed import problem for local
---
web/htdocs/webconf.py | 9 ++++++++-
web/plugins/sidebar/webconf.py | 4 +++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/webconf.py b/web/htdocs/webconf.py
index 145179b..00a2cea 100644
--- a/web/htdocs/webconf.py
+++ b/web/htdocs/webconf.py
@@ -1,6 +1,13 @@
#!/usr/bin/python
-import config, pprint
+
+from mod_python import importer
+config = importer.import_module("config", path =
["/omd/sites/webconf/share/check_mk/web/htdocs"])
+# config = importer.import_module("config")
+
+import sys, pprint
from lib import *
+# import config
+
config.declare_permission("use_webconf",
"Use Webconfiguration",
diff --git a/web/plugins/sidebar/webconf.py b/web/plugins/sidebar/webconf.py
index 3b01eb6..2e802b3 100644
--- a/web/plugins/sidebar/webconf.py
+++ b/web/plugins/sidebar/webconf.py
@@ -6,7 +6,9 @@ def render_webconf_files():
if not config.may("use_webconf"):
html.write("You are not allowed to use Check_MK's web configuration
GUI.")
elif len(config.config_files)== 0:
- html.write("No configuration files are defined. Please set the variable
<tt>config_files</tt> in <tt>multisite.mk</tt>.")
+ html.write("No configuration files are defined.<br>"
+ "Please set the variable <tt>config_files</tt><br>"
+ "in <tt>multisite.mk</tt>.")
else:
for filename, title, roles in config.config_files: