From a1d9b137a298d929caab9fa8556c110489d2b06d Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Fri, 5 Dec 2014 21:49:17 +0200 Subject: Check the return value of slots, it can be None. --- checkers/classes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/checkers/classes.py b/checkers/classes.py index eeaf689..030bee6 100644 --- a/checkers/classes.py +++ b/checkers/classes.py @@ -585,6 +585,8 @@ a metaclass class method.'} return slots = klass.slots() + if slots is None: + return # If any ancestor doesn't use slots, the slots # defined for this class are superfluous. if any('__slots__' not in ancestor.locals and -- cgit v1.2.1