summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-12-04 08:33:21 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2018-12-04 08:33:21 +0100
commitd03cd2225c7c9d7cea3b441942555749c64f449b (patch)
tree7d4cdb3400408e4ee171795ddf26f634ea551318
parent9ea356a3639aea0c9951a85c988d720dde613e25 (diff)
downloadastroid-git-d03cd2225c7c9d7cea3b441942555749c64f449b.tar.gz
Fix a bug where an Attribute used as a base class was triggering a crash
Close #626
-rw-r--r--ChangeLog4
-rw-r--r--astroid/bases.py2
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ee1da255..27dc332d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,10 @@ What's New in astroid 2.2.0?
============================
Release Date: TBA
+* Fix a bug where an Attribute used as a base class was triggering a crash
+
+ Close #626
+
* Added special support for `enum.IntFlag`
Close PyCQA/pylint#2534
diff --git a/astroid/bases.py b/astroid/bases.py
index 318ddb5d..8fbbebf2 100644
--- a/astroid/bases.py
+++ b/astroid/bases.py
@@ -82,6 +82,8 @@ def _is_property(meth):
continue
if inferred.__class__.__name__ == "ClassDef":
for base_class in inferred.bases:
+ if base_class.__class__.__name__ != "Name":
+ continue
module, _ = base_class.lookup(base_class.name)
if module.name == BUILTINS and base_class.name == "property":
return True