mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
Patch by Roger Serwy.
This commit is contained in:
parent
c8bd74ddfd
commit
07e0e06f8a
2 changed files with 4 additions and 1 deletions
|
@ -1618,7 +1618,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
|
||||||
|
|
|
@ -182,6 +182,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.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue