diff options
author | Torsten Marek <shlomme@gmail.com> | 2014-04-26 20:47:42 +0200 |
---|---|---|
committer | Torsten Marek <shlomme@gmail.com> | 2014-04-26 20:47:42 +0200 |
commit | ee970b32970ce02e7a1ebd719a5513939db7256f (patch) | |
tree | a9a1e65f55c1f8d7bf7950b35004fba1c3cc7368 /raw_building.py | |
parent | 4aeefb49df1bd1b52e40e1e0064ef5d91938a42e (diff) | |
download | astroid-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.py | 3 |
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) |