diff --git a/Lib/traceback.py b/Lib/traceback.py index 31b82553798..3d877ee1502 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: