vregistry.py
changeset 2760 30063071aee0
parent 2689 44f041222d0f
child 2771 8074dd88e21b
child 2836 b94b9c48111f
--- a/vregistry.py	Mon Aug 10 18:01:46 2009 +0200
+++ b/vregistry.py	Tue Aug 11 12:20:13 2009 +0200
@@ -206,7 +206,7 @@
         super(VRegistry, self).__init__()
         self.config = config
 
-    def reset(self, force_reload=None):
+    def reset(self, path=None, force_reload=None):
         self.clear()
         self._lastmodifs = {}
 
@@ -318,14 +318,7 @@
         self._loadedmods = {}
         return filemods
 
-    def register_objects(self, path, force_reload=None, extrapath=None):
-        if force_reload is None:
-            force_reload = self.config.mode == 'dev'
-        elif not force_reload:
-            # force_reload == False usually mean modules have been reloaded
-            # by another connection, so we want to update the registry
-            # content even if there has been no module content modification
-            self.reset()
+    def register_objects(self, path, force_reload, extrapath=None):
         # need to clean sys.path this to avoid import confusion pb (i.e.
         # having the same module loaded as 'cubicweb.web.views' subpackage and
         # as views'  or 'web.views' subpackage