[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).
--- 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')