[prev in list] [next in list] [prev in thread] [next in thread] 

List:       omd-commits
Subject:    [omd-commits] OMD Git: omd: check_mk: fix problem in Python search path
From:       git () mathias-kettner ! de (git version control)
Date:       2011-07-27 16:34:43
Message-ID: 20110727163443.38A78C029F9 () mail ! mathias-kettner ! de
[Download RAW message or body]

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
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic