summaryrefslogtreecommitdiff
path: root/astroid/objects.py
diff options
context:
space:
mode:
authorCeridwen <ceridwenv@gmail.com>2015-09-21 10:47:35 -0400
committerCeridwen <ceridwenv@gmail.com>2015-09-21 10:47:35 -0400
commita1dcb2d18a65be6034459832c91bc5eacbee3c1e (patch)
tree52c6d83a27261bea738b505bd4047d945661e28f /astroid/objects.py
parentaccff12b2d28a3f87d2dc4f5373fb8e1e5de3408 (diff)
downloadastroid-git-a1dcb2d18a65be6034459832c91bc5eacbee3c1e.tar.gz
Use six.reraise to avoid losing tracebacks for simple cases
Diffstat (limited to 'astroid/objects.py')
-rw-r--r--astroid/objects.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/astroid/objects.py b/astroid/objects.py
index a25b529e..8c0365ef 100644
--- a/astroid/objects.py
+++ b/astroid/objects.py
@@ -26,6 +26,8 @@ leads to an inferred FrozenSet:
"""
+import sys
+
import six
from astroid import bases
@@ -141,7 +143,9 @@ class Super(bases.NodeNG):
except (exceptions.MroError, exceptions.SuperError) as exc:
# Don't let invalid MROs or invalid super calls
# to leak out as is from this function.
- six.raise_from(exceptions.NotFoundError, exc)
+ six.reraise(exceptions.NotFoundError,
+ exceptions.NotFoundError(*exc.args),
+ sys.exc_info()[2])
found = False
for cls in mro: