From 5400b6b2e295ea96ac96169692c3c50b91b17ed6 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 1 Aug 2008 01:21:50 +0000 Subject: [PATCH] Fix a DeprecationWarning about __getitem__() and exceptions in the 'traceback' module. --- Lib/traceback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/traceback.py b/Lib/traceback.py index 31b8255379..3d877ee150 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -181,7 +181,7 @@ def format_exception_only(etype, value): # It was a syntax error; show exactly where the problem was found. lines = [] try: - msg, (filename, lineno, offset, badline) = value + msg, (filename, lineno, offset, badline) = value.args except Exception: pass else: -- 2.50.0