[omd-commits] OMD Git: omd: check_mk: fix problem in Python search path

git version control git at mathias-kettner.de
Wed Jul 27 18:34:43 CEST 2011


Module:   omd
Branch:   master
Commit:   1688da43e5b5498f793e6c67056ecc1944beff04
URL:      http://omdistro.org/projects/omd/repository/revisions/1688da43e5b5498f793e6c67056ecc1944beff04

Author:   Mathias Kettner <mk at mathias-kettner.de>
Date:     Wed Jul 27 18:34:38 2011 +0200
Commiter: Mathias Kettner <mk at mathias-kettner.de>
Date:     Wed Jul 27 18:34:38 2011 +0200

check_mk: fix problem in Python search path

mod_python somehow looses the information about
the parent module, when import and execfile()(
are nested. That way the module path gets lost
and modules are loaded again with a new instance.
By adding the complete module path to the Apache
configuration, this seems to be fixed.

---

 packages/check_mk/skel/etc/check_mk/apache.conf |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/packages/check_mk/skel/etc/check_mk/apache.conf b/packages/check_mk/skel/etc/check_mk/apache.conf
index 7b1a983..3d7b250 100644
--- a/packages/check_mk/skel/etc/check_mk/apache.conf
+++ b/packages/check_mk/skel/etc/check_mk/apache.conf
@@ -26,7 +26,7 @@ Alias /###SITE###/check_mk/agents ###ROOT###/share/check_mk/agents
   <Directory ###ROOT###/share/check_mk/web/htdocs>
         AddHandler mod_python .py
         PythonHandler index
-        PythonOption mod_python.importer.path "['###ROOT###/local/share/check_mk/web/htdocs']"
+        PythonOption mod_python.importer.path "['###ROOT###/local/share/check_mk/web/htdocs', '###ROOT###/share/check_mk/web/htdocs']"
         PythonInterpreter ###SITE###
         DirectoryIndex index.py
 



More information about the omd-commits mailing list