Commit 64df4a1c authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.

Patch by Roger Serwy.
parents e261055e 07e0e06f
...@@ -1621,7 +1621,7 @@ class IndentSearcher(object): ...@@ -1621,7 +1621,7 @@ class IndentSearcher(object):
tokens = _tokenize.generate_tokens(self.readline) tokens = _tokenize.generate_tokens(self.readline)
for token in tokens: for token in tokens:
self.tokeneater(*token) self.tokeneater(*token)
except _tokenize.TokenError: except (_tokenize.TokenError, SyntaxError):
# since we cut off the tokenizer early, we can trigger # since we cut off the tokenizer early, we can trigger
# spurious errors # spurious errors
pass pass
......
...@@ -117,6 +117,9 @@ Core and Builtins ...@@ -117,6 +117,9 @@ Core and Builtins
Library Library
------- -------
- Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer. Patch by
Roger Serwy.
- Issue #16618: Make glob.glob match consistently across strings and bytes - Issue #16618: Make glob.glob match consistently across strings and bytes
regarding leading dots. Patch by Serhiy Storchaka. regarding leading dots. Patch by Serhiy Storchaka.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment