mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-122546: Relax SyntaxError check when raising errors on the new REPL (#123233)
This commit is contained in:
parent
297f2e093e
commit
4c3f0cbeae
2 changed files with 5 additions and 1 deletions
|
@ -108,7 +108,7 @@ class InteractiveInterpreter:
|
|||
"""
|
||||
try:
|
||||
typ, value, tb = sys.exc_info()
|
||||
if filename and typ is SyntaxError:
|
||||
if filename and issubclass(typ, SyntaxError):
|
||||
value.filename = filename
|
||||
source = kwargs.pop('source', "")
|
||||
self._showtraceback(typ, value, None, source)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue