Show More
@@ -53,7 +53,14 b' if sys.version_info[0] >= 3:' | |||||
53 |
|
53 | |||
54 | # TODO need to support loaders from alternate specs, like zip |
|
54 | # TODO need to support loaders from alternate specs, like zip | |
55 | # loaders. |
|
55 | # loaders. | |
56 |
|
|
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 | return spec |
|
64 | return spec | |
58 |
|
65 | |||
59 | def replacetokens(tokens, fullname): |
|
66 | def replacetokens(tokens, fullname): |
General Comments 0
You need to be logged in to leave comments.
Login now