summaryrefslogtreecommitdiff
path: root/astroid/rebuilder.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/rebuilder.py')
-rw-r--r--astroid/rebuilder.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py
index a323e972..5d4ffcff 100644
--- a/astroid/rebuilder.py
+++ b/astroid/rebuilder.py
@@ -125,7 +125,8 @@ class TreeRebuilder(object):
def visit_module(self, node, modname, modpath, package):
"""visit a Module node by returning a fresh instance of it"""
node, doc = _get_doc(node)
- newnode = nodes.Module(name=modname, doc=doc, file=modpath, path=modpath,
+ newnode = nodes.Module(name=modname, doc=doc, file=modpath,
+ path=[modpath],
package=package, parent=None)
newnode.postinit([self.visit(child, newnode) for child in node.body])
return newnode