mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
traceback now shows error position for all SyntaxError subclasses,
e.g. IndentationError. (bug #1447885)
This commit is contained in:
parent
3bf538f13d
commit
51dbc4c879
2 changed files with 11 additions and 1 deletions
|
|
@ -165,7 +165,7 @@ def format_exception_only(etype, value):
|
|||
if value is None:
|
||||
list.append(str(stype) + '\n')
|
||||
else:
|
||||
if etype is SyntaxError:
|
||||
if issubclass(etype, SyntaxError):
|
||||
try:
|
||||
msg, (filename, lineno, offset, line) = value
|
||||
except:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue