Fix a DeprecationWarning about __getitem__() and exceptions in the 'traceback' module.

This commit is contained in:
Brett Cannon 2008-08-01 01:21:50 +00:00
parent 06847b13ca
commit 5400b6b2e2

View 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: