diff options
author | Sergey B Kirpichev <skirpichev@gmail.com> | 2024-08-22 23:25:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-22 23:25:33 (GMT) |
commit | 4c3f0cbeaec0d49212d305618743fabb0e74a696 (patch) | |
tree | 2baf6230407365e6c75f8fb5e9864a1d17431d33 /Lib/code.py | |
parent | 297f2e093ec95800ae2184330b8408c875523467 (diff) | |
download | cpython-4c3f0cbeaec0d49212d305618743fabb0e74a696.zip cpython-4c3f0cbeaec0d49212d305618743fabb0e74a696.tar.gz cpython-4c3f0cbeaec0d49212d305618743fabb0e74a696.tar.bz2 |
gh-122546: Relax SyntaxError check when raising errors on the new REPL (#123233)
Diffstat (limited to 'Lib/code.py')
-rw-r--r-- | Lib/code.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/code.py b/Lib/code.py index c559191..c7c59ee 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) |