- exec(code, mod.__dict__)
- entry[1] = cachedmod(mod, sb.st_mtime)
+ mod.__current__ = current()
+ try:
+ exec(code, mod.__dict__)
+ except:
+ mod.__current__.uncurrent()
+ raise
+ else:
+ if entry[1] is not None:
+ entry[1].mod.__current__.uncurrent()
+ entry[1] = cachedmod(mod, sb.st_mtime)