summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index b839985..fb578c5 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -1649,8 +1649,8 @@ class SizeofTest(unittest.TestCase):
check(_ast.AST(), size('P'))
try:
raise TypeError
- except TypeError:
- tb = sys.exc_info()[2]
+ except TypeError as e:
+ tb = e.__traceback__
# traceback
if tb is not None:
check(tb, size('2P2i'))