r5433 - trunk/cumin/python/cumin

tmckay at fedoraproject.org tmckay at fedoraproject.org
Fri Jul 13 20:15:32 UTC 2012


Author: tmckay
Date: 2012-07-13 20:15:31 +0000 (Fri, 13 Jul 2012)
New Revision: 5433

Modified:
   trunk/cumin/python/cumin/main.py
Log:
Print exceptions during cumin module import so that syntax errors can be seen.
(this has to do with the use of __import__())


Modified: trunk/cumin/python/cumin/main.py
===================================================================
--- trunk/cumin/python/cumin/main.py	2012-07-13 14:22:14 UTC (rev 5432)
+++ trunk/cumin/python/cumin/main.py	2012-07-13 20:15:31 UTC (rev 5433)
@@ -162,8 +162,11 @@
             try:
                 m = __import__(name, globals())
                 m.Module(self, name)
-            except:
+            except ImportError:
                 pass
+            except Exception, e:
+                import traceback
+                traceback.print_exc()
 
     def db_init(self, schema_version_check=True):
         self.model.init()



More information about the cumin-developers mailing list