]> granicus.if.org Git - python/commitdiff
Fix a DeprecationWarning about __getitem__() and exceptions in the 'traceback' module.
authorBrett Cannon <bcannon@gmail.com>
Fri, 1 Aug 2008 01:21:50 +0000 (01:21 +0000)
committerBrett Cannon <bcannon@gmail.com>
Fri, 1 Aug 2008 01:21:50 +0000 (01:21 +0000)
Lib/traceback.py

index 31b825537989e3a00d2777c31cee3a64455ccbd6..3d877ee1502b38281c76d30c373993602e40f62f 100644 (file)
@@ -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: