vregistry.py
changeset 2662 87aed8cb7ff6
parent 2658 5535857eeaa5
child 2689 44f041222d0f
--- a/vregistry.py	Mon Aug 03 16:31:30 2009 +0200
+++ b/vregistry.py	Mon Aug 03 16:32:30 2009 +0200
@@ -213,11 +213,15 @@
         super(VRegistry, self).__init__()
         self.config = config
 
-    def reset(self):
+    def reset(self, force_reload=None):
         self.clear()
         self._lastmodifs = {}
+        # don't reload uicfg when appobjects modules won't be reloaded as well
         if uicfg is not None:
-            reload(uicfg)
+            if force_reload is None:
+                force_reload = self.config.mode == 'dev'
+            if force_reload:
+                reload(uicfg)
 
     def __getitem__(self, name):
         """return the registry (dictionary of class objects) associated to