diff options
Diffstat (limited to 'astroid/objects.py')
-rw-r--r-- | astroid/objects.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/astroid/objects.py b/astroid/objects.py index ac689808..5fd594df 100644 --- a/astroid/objects.py +++ b/astroid/objects.py @@ -103,7 +103,10 @@ class Super(NodeNG): self._class_based = True mro_type = self.type else: - mro_type = self.type._proxied + mro_type = getattr(self.type, '_proxied', None) + if not isinstance(mro_type, (Instance, Class)): + raise SuperError("super(type, obj): obj must be an instance " + "or subtype of type") if not mro_type.newstyle: raise SuperError("Unable to call super on old-style classes.") |