summaryrefslogtreecommitdiff
path: root/raw_building.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
commitee970b32970ce02e7a1ebd719a5513939db7256f (patch)
treea9a1e65f55c1f8d7bf7950b35004fba1c3cc7368 /raw_building.py
parent4aeefb49df1bd1b52e40e1e0064ef5d91938a42e (diff)
downloadastroid-ee970b32970ce02e7a1ebd719a5513939db7256f.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 'raw_building.py')
-rw-r--r--raw_building.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/raw_building.py b/raw_building.py
index 720cdce..bb685a9 100644
--- a/raw_building.py
+++ b/raw_building.py
@@ -225,7 +225,8 @@ class InspectBuilder(object):
# in jython, java modules have no __doc__ (see #109562)
node = build_module(modname)
node.file = node.path = path and abspath(path) or path
- MANAGER.astroid_cache[modname] = node
+ node.name = modname
+ MANAGER.cache_module(node)
node.package = hasattr(module, '__path__')
self._done = {}
self.object_build(node, module)