[registry] backout 120c7ea6e1fa: errors should not pass silently stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 10 Dec 2010 15:47:09 +0100
branchstable
changeset 6742 e03d427209cb
parent 6740 e4974d5f7dca
child 6743 d2d7a5d9164d
[registry] backout 120c7ea6e1fa: errors should not pass silently Catching ImportError silently while loading files has too many side effects. (e.g. if system hooks / entities can't be registered).
cwvreg.py
--- a/cwvreg.py	Thu Dec 09 16:30:06 2010 +0100
+++ b/cwvreg.py	Fri Dec 10 15:47:09 2010 +0100
@@ -462,7 +462,6 @@
     def clear(self): pass
     def initialization_completed(self): pass
 
-
 class CubicWebVRegistry(VRegistry):
     """Central registry for the cubicweb instance, extending the generic
     VRegistry with some cubicweb specific stuff.
@@ -560,14 +559,6 @@
         if self.is_reload_needed(path):
             self.reload(path)
 
-    def load_file(self, filepath, modname):
-        try:
-            super(CubicWebVRegistry, self).load_file(filepath, modname)
-        except ImportError:
-            if self.config.debugmode:
-                raise
-            self.exception('failed to load %s from %s', filepath, modname)
-
     def reload(self, path, force_reload=True):
         """modification detected, reset and reload the vreg"""
         CW_EVENT_MANAGER.emit('before-registry-reload')