mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Fix a DeprecationWarning about __getitem__() and exceptions in the 'traceback' module.
This commit is contained in:
parent
06847b13ca
commit
5400b6b2e2
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue