mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
This commit is contained in:
@@ -1611,7 +1611,7 @@ class IndentSearcher(object):
|
||||
try:
|
||||
try:
|
||||
_tokenize.tokenize(self.readline, self.tokeneater)
|
||||
except _tokenize.TokenError:
|
||||
except (_tokenize.TokenError, SyntaxError):
|
||||
# since we cut off the tokenizer early, we can trigger
|
||||
# spurious errors
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user