Kaydet (Commit) 5400b6b2 authored tarafından Brett Cannon's avatar Brett Cannon

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

üst 06847b13
...@@ -181,7 +181,7 @@ def format_exception_only(etype, value): ...@@ -181,7 +181,7 @@ def format_exception_only(etype, value):
# It was a syntax error; show exactly where the problem was found. # It was a syntax error; show exactly where the problem was found.
lines = [] lines = []
try: try:
msg, (filename, lineno, offset, badline) = value msg, (filename, lineno, offset, badline) = value.args
except Exception: except Exception:
pass pass
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment