[Mpuls-commits] r2728 - in base/trunk: . mpulsweb/config

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 21 19:15:23 CEST 2010


Author: bh
Date: 2010-05-21 19:15:22 +0200 (Fri, 21 May 2010)
New Revision: 2728

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/config/importer.py
Log:
* mpulsweb/config/importer.py (import_overridable_module): Only
append mpuls.app.root to sys.path if it's not already in the path.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-05-21 17:03:51 UTC (rev 2727)
+++ base/trunk/ChangeLog	2010-05-21 17:15:22 UTC (rev 2728)
@@ -1,5 +1,10 @@
 2010-05-21  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/config/importer.py (import_overridable_module): Only
+	append mpuls.app.root to sys.path if it's not already in the path.
+
+2010-05-21  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/config/middleware.py (SimpleExceptionLogger): New class
 	for very simple an more robust exception logging.
 	(make_app): Install SimpleExceptionLogger if the config option

Modified: base/trunk/mpulsweb/config/importer.py
===================================================================
--- base/trunk/mpulsweb/config/importer.py	2010-05-21 17:03:51 UTC (rev 2727)
+++ base/trunk/mpulsweb/config/importer.py	2010-05-21 17:15:22 UTC (rev 2728)
@@ -27,7 +27,8 @@
 
     # Append root dir of the application configuration to the pythonpath
     app_root = config.get('mpuls.app.root')
-    sys.path.append(app_root)
+    if app_root not in sys.path:
+        sys.path.append(app_root)
 
     instance_module = config.get('mpuls.app.instance') + "." + modulename
     module = try_import_module(instance_module)



More information about the Mpuls-commits mailing list