aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/code.py
diff options
context:
space:
mode:
authorSergey B Kirpichev <skirpichev@gmail.com>2024-08-23 02:25:33 +0300
committerGitHub <noreply@github.com>2024-08-23 00:25:33 +0100
commit4c3f0cbeaec0d49212d305618743fabb0e74a696 (patch)
tree2baf6230407365e6c75f8fb5e9864a1d17431d33 /Lib/code.py
parent297f2e093ec95800ae2184330b8408c875523467 (diff)
downloadcpython-4c3f0cbeaec0d49212d305618743fabb0e74a696.tar.gz
cpython-4c3f0cbeaec0d49212d305618743fabb0e74a696.zip
gh-122546: Relax SyntaxError check when raising errors on the new REPL (#123233)
Diffstat (limited to 'Lib/code.py')
-rw-r--r--Lib/code.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/code.py b/Lib/code.py
index c559191d8a7..c7c59ee2021 100644
--- a/Lib/code.py
+++ b/Lib/code.py
@@ -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)