diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2010-09-21 16:08:32 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2010-09-21 16:08:32 +0200 |
commit | 326f84469c40d5f6ca656036f5212bba4ce09c34 (patch) | |
tree | b98522ed2827c838e552a3c3dd73fdbe77eaf504 /builder.py | |
parent | ca49e5aecc1bf0f556527dc80b176cf0385a8a7d (diff) | |
download | astroid-git-326f84469c40d5f6ca656036f5212bba4ce09c34.tar.gz |
fix #45959: AttributeError: 'NoneType' object has no attribute 'frame'
due to handling of __class__ when importing from living object (because
of missing source code or C-compiled object)
--HG--
branch : stable
Diffstat (limited to 'builder.py')
-rw-r--r-- | builder.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -190,6 +190,8 @@ class ASTNGBuilder: class_node = object_build_class(node, member, name) # recursion self.object_build(class_node, member) + if name == '__class__' and class_node.parent is None: + class_node.parent = self._done[self._module] elif ismethoddescriptor(member): assert isinstance(member, object) object_build_methoddescriptor(node, member, name) |