Index: third_party/logilab/astroid/raw_building.py |
diff --git a/third_party/logilab/astroid/raw_building.py b/third_party/logilab/astroid/raw_building.py |
index 08f6af6da9cb7ee9ecc25f66987af35c69f2f26f..d5e8b3d32bb8b7e222ccc74d5c261198aba15201 100644 |
--- a/third_party/logilab/astroid/raw_building.py |
+++ b/third_party/logilab/astroid/raw_building.py |
@@ -332,12 +332,14 @@ class InspectBuilder(object): |
Astroid_BUILDER = InspectBuilder() |
_CONST_PROXY = {} |
-def astroid_bootstrapping(): |
+def _astroid_bootstrapping(astroid_builtin=None): |
"""astroid boot strapping the builtins module""" |
# this boot strapping is necessary since we need the Const nodes to |
# inspect_build builtins, and then we can proxy Const |
- from logilab.common.compat import builtins |
- astroid_builtin = Astroid_BUILDER.inspect_build(builtins) |
+ if astroid_builtin is None: |
+ from logilab.common.compat import builtins |
+ astroid_builtin = Astroid_BUILDER.inspect_build(builtins) |
+ |
for cls, node_cls in CONST_CLS.items(): |
if cls is type(None): |
proxy = build_class('NoneType') |
@@ -349,7 +351,7 @@ def astroid_bootstrapping(): |
else: |
_CONST_PROXY[cls] = proxy |
-astroid_bootstrapping() |
+_astroid_bootstrapping() |
# TODO : find a nicer way to handle this situation; |
# However __proxied introduced an |