Show More
@@ -149,9 +149,10 b' def _demandimport(name, globals=None, lo' | |||||
149 | If the symbol doesn't exist in the parent module, it must be a |
|
149 | If the symbol doesn't exist in the parent module, it must be a | |
150 | module. We set missing modules up as _demandmod instances. |
|
150 | module. We set missing modules up as _demandmod instances. | |
151 | """ |
|
151 | """ | |
152 |
|
|
152 | symbol = getattr(mod, attr, nothing) | |
153 | setattr(mod, attr, |
|
153 | if symbol is nothing: | |
154 |
|
|
154 | symbol = _demandmod(attr, mod.__dict__, locals, **kwargs) | |
|
155 | setattr(mod, attr, symbol) | |||
155 |
|
156 | |||
156 | if level >= 0: |
|
157 | if level >= 0: | |
157 | # Mercurial's enforced import style does not use |
|
158 | # Mercurial's enforced import style does not use |
General Comments 0
You need to be logged in to leave comments.
Login now