summaryrefslogtreecommitdiffstats
path: root/Lib/code.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-08-23 00:32:11 (GMT)
committerGitHub <noreply@github.com>2024-08-23 00:32:11 (GMT)
commitfda8aec625d5be02ebb1c67fad89db85fa1f4f12 (patch)
treee5a30b620e50803720d18ccad4c4f68145acaf35 /Lib/code.py
parent30eee22d3f5b637d2a9536c2d7bf448f6ac14118 (diff)
downloadcpython-fda8aec625d5be02ebb1c67fad89db85fa1f4f12.zip
cpython-fda8aec625d5be02ebb1c67fad89db85fa1f4f12.tar.gz
cpython-fda8aec625d5be02ebb1c67fad89db85fa1f4f12.tar.bz2
[3.13] gh-122546: Relax SyntaxError check when raising errors on the new REPL (GH-123233) (#123247)
gh-122546: Relax SyntaxError check when raising errors on the new REPL (GH-123233) (cherry picked from commit 4c3f0cbeaec0d49212d305618743fabb0e74a696) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
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 5f7a2d3..25f5b6a 100644
--- a/Lib/code.py
+++ b/Lib/code.py
@@ -110,7 +110,7 @@ class InteractiveInterpreter:
colorize = kwargs.pop('colorize', False)
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, colorize, source)