##// END OF EJS Templates
python3: allow hgloader to work with lazy loaders...
Siddharth Agarwal -
r32425:397e3a2e default
parent child Browse files
Show More
@@ -53,7 +53,14 b' if sys.version_info[0] >= 3:'
53 53
54 54 # TODO need to support loaders from alternate specs, like zip
55 55 # loaders.
56 spec.loader = hgloader(spec.name, spec.origin)
56 loader = hgloader(spec.name, spec.origin)
57 # Can't use util.safehasattr here because that would require
58 # importing util, and we're in import code.
59 if hasattr(spec.loader, 'loader'): # hasattr-py3-only
60 # This is a nested loader (maybe a lazy loader?)
61 spec.loader.loader = loader
62 else:
63 spec.loader = loader
57 64 return spec
58 65
59 66 def replacetokens(tokens, fullname):
General Comments 0
You need to be logged in to leave comments. Login now