summaryrefslogtreecommitdiff
path: root/astroid/objects.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-05-27 14:45:30 +0800
committerClaudiu Popa <pcmanticore@gmail.com>2018-05-31 12:56:28 +0800
commit8374023e3ae0ad4c9ceffb8b5c29aa1fde20433f (patch)
tree3e1bd54f29edc7b34bc59b2caab0fa46a153f64e /astroid/objects.py
parent329deed20f8f8d65288ff7ae01b12e69c66f08c7 (diff)
downloadastroid-git-8374023e3ae0ad4c9ceffb8b5c29aa1fde20433f.tar.gz
Remove reraise() in favour of using raise..from
Diffstat (limited to 'astroid/objects.py')
-rw-r--r--astroid/objects.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/astroid/objects.py b/astroid/objects.py
index 0a83fc26..f7a738b9 100644
--- a/astroid/objects.py
+++ b/astroid/objects.py
@@ -133,16 +133,16 @@ class Super(node_classes.NodeNG):
# Don't let invalid MROs or invalid super calls
# leak out as is from this function.
except exceptions.SuperError as exc:
- util.reraise(exceptions.AttributeInferenceError(
+ raise exceptions.AttributeInferenceError(
('Lookup for {name} on {target!r} because super call {super!r} '
'is invalid.'),
- target=self, attribute=name, context=context, super_=exc.super_))
+ target=self, attribute=name, context=context, super_=exc.super_) from exc
except exceptions.MroError as exc:
- util.reraise(exceptions.AttributeInferenceError(
+ raise exceptions.AttributeInferenceError(
('Lookup for {name} on {target!r} failed because {cls!r} has an '
'invalid MRO.'),
target=self, attribute=name, context=context, mros=exc.mros,
- cls=exc.cls))
+ cls=exc.cls) from exc
found = False
for cls in mro:
if name not in cls.locals: