summaryrefslogtreecommitdiff
path: root/builder.py
diff options
context:
space:
mode:
authorTorsten Marek <shlomme@gmail.com>2014-04-26 20:47:42 +0200
committerTorsten Marek <shlomme@gmail.com>2014-04-26 20:47:42 +0200
commit67bc089414d086aad5420bb69e05f67c84008f27 (patch)
tree3979d17a2b7d35cf0c495ca4d1d16520a0b1043b /builder.py
parent0e131af59e62e3730f85699041a4785695bbe906 (diff)
downloadastroid-git-67bc089414d086aad5420bb69e05f67c84008f27.tar.gz
Only cache modules if no other module with the same name is known yet, and
only return cached modules if name and filepath match.
Diffstat (limited to 'builder.py')
-rw-r--r--builder.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/builder.py b/builder.py
index ef86ce62..b6ceff82 100644
--- a/builder.py
+++ b/builder.py
@@ -145,7 +145,7 @@ class AstroidBuilder(InspectBuilder):
after a module has been built
"""
module.file_encoding = encoding
- self._manager.astroid_cache[module.name] = module
+ self._manager.cache_module(module)
# post tree building steps after we stored the module in the cache:
for from_node in module._from_nodes:
if from_node.modname == '__future__':