vregistry.py
branchstable
changeset 3565 4db55832e8a9
parent 3071 6ad4e6d4df86
child 3589 a5432f99f2d9
child 3638 648d6dbec630
--- a/vregistry.py	Tue Oct 06 16:50:11 2009 +0200
+++ b/vregistry.py	Tue Oct 06 17:12:26 2009 +0200
@@ -361,10 +361,13 @@
             # if it was modified, raise RegistryOutOfDate to reload everything
             self.info('File %s changed since last visit', filepath)
             raise RegistryOutOfDate()
+        # set update time before module loading, else we get some reloading
+        # weirdness in case of syntax error or other error while importing the
+        # module
+        self._lastmodifs[filepath] = modified_on
         # load the module
         module = load_module_from_name(modname, use_sys=not force_reload)
         self.load_module(module)
-        self._lastmodifs[filepath] = modified_on
         return True
 
     def load_module(self, module):