[vreg] we should now reset in init_registration since we don't do it in __init__
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 30 Apr 2010 12:46:51 +0200
changeset 5446 b018324198d4
parent 5445 4467ed43d97d
child 5447 f29dafba250a
[vreg] we should now reset in init_registration since we don't do it in __init__
cwvreg.py
vregistry.py
--- a/cwvreg.py	Fri Apr 30 12:15:37 2010 +0200
+++ b/cwvreg.py	Fri Apr 30 12:46:51 2010 +0200
@@ -518,7 +518,6 @@
                 if not cube in cubes:
                     cpath = cfg.build_vregistry_cube_path([cfg.cube_dir(cube)])
                     cleanup_sys_modules(cpath)
-        self.reset()
         self.register_objects(path, force_reload)
         CW_EVENT_MANAGER.emit('after-registry-reload')
 
--- a/vregistry.py	Fri Apr 30 12:15:37 2010 +0200
+++ b/vregistry.py	Fri Apr 30 12:46:51 2010 +0200
@@ -406,6 +406,7 @@
     # initialization methods ###################################################
 
     def init_registration(self, path, extrapath=None):
+        self.reset()
         # compute list of all modules that have to be loaded
         self._toloadmods, filemods = _toload_info(path, extrapath)
         # XXX is _loadedmods still necessary ? It seems like it's useful