[Mpuls-commits] r1282 - wasko/branches/2.0/mpulsweb/config

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 5 16:19:34 CET 2010


Author: torsten
Date: 2010-02-05 16:19:33 +0100 (Fri, 05 Feb 2010)
New Revision: 1282

Modified:
   wasko/branches/2.0/mpulsweb/config/middleware.py
Log:
* mpulsweb/config/middleware.py (MyPylonsApp.find_controller): Log
error and exception if no controller can be found.


Modified: wasko/branches/2.0/mpulsweb/config/middleware.py
===================================================================
--- wasko/branches/2.0/mpulsweb/config/middleware.py	2010-02-05 14:53:37 UTC (rev 1281)
+++ wasko/branches/2.0/mpulsweb/config/middleware.py	2010-02-05 15:19:33 UTC (rev 1282)
@@ -49,7 +49,12 @@
                 full_module_name = 'mpulsweb' + \
                                    '.controllers.' + controller.replace('/', '.')
                 log.debug("Module not found! Trying to load from base location: %s" % full_module_name)
-                __import__(full_module_name)
+                try:
+                    __import__(full_module_name)
+                except ImportError, e:
+                    log.error("Module not found!")
+                    log.exception(e)
+                    raise
 
             if hasattr(sys.modules[full_module_name], '__controller__'):
                 mycontroller = getattr(sys.modules[full_module_name],



More information about the Mpuls-commits mailing list