Browse Source

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

pull/2332/head
Serhiy Storchaka 13 years ago
parent
commit
61006a2113
  1. 2
      Lib/idlelib/EditorWindow.py
  2. 3
      Misc/NEWS

2
Lib/idlelib/EditorWindow.py

@ -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

3
Misc/NEWS

@ -164,6 +164,9 @@ Core and Builtins
Library
-------
- Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer. Patch by
Roger Serwy.
- Issue #16702: test_urllib2_localnet tests now correctly ignores proxies for
localhost tests.

Loading…
Cancel
Save