# HG changeset patch # User Sylvain Thénault # Date 1254841946 -7200 # Node ID 4db55832e8a9dd654d0dcdad7405d41963e75381 # Parent b03cc2416cd5362894414cd55149c535a26c2f40 [vreg] fix reloading pb w/ module level error diff -r b03cc2416cd5 -r 4db55832e8a9 vregistry.py --- 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):