From: Brett Cannon Date: Fri, 1 Aug 2008 01:21:50 +0000 (+0000) Subject: Fix a DeprecationWarning about __getitem__() and exceptions in the 'traceback' module. X-Git-Tag: v2.6b3~188 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5400b6b2e295ea96ac96169692c3c50b91b17ed6;p=thirdparty%2FPython%2Fcpython.git Fix a DeprecationWarning about __getitem__() and exceptions in the 'traceback' module. --- diff --git a/Lib/traceback.py b/Lib/traceback.py index 31b825537989..3d877ee1502b 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: