##// END OF EJS Templates
demandimport: patch __builtin__ instead of __builtins__...
Dirkjan Ochtman -
r7727:25fc4c62 default
parent child Browse files
Show More
@@ -24,6 +24,7 b' These imports will not be delayed:'
24 24 b = __import__(a)
25 25 '''
26 26
27 import __builtin__
27 28 _origimport = __import__
28 29
29 30 class _demandmod(object):
@@ -126,9 +127,9 b' ignore = ['
126 127
127 128 def enable():
128 129 "enable global demand-loading of modules"
129 __builtins__["__import__"] = _demandimport
130 __builtin__.__import__ = _demandimport
130 131
131 132 def disable():
132 133 "disable global demand-loading of modules"
133 __builtins__["__import__"] = _origimport
134 __builtin__.__import__ = _origimport
134 135
General Comments 0
You need to be logged in to leave comments. Login now