diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2012-12-27 21:38:04 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2012-12-27 21:38:04 +0200 |
commit | 07e0e06f8a255a73d181e332dd8658814eb1ca50 (patch) | |
tree | 1b611b45e24e3134804ac72adc103c8258746e84 /Lib | |
parent | c8bd74ddfd5a41e8f37181bf4ba3c9e37b6d65b1 (diff) | |
download | cpython-git-07e0e06f8a255a73d181e332dd8658814eb1ca50.tar.gz |
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
Patch by Roger Serwy.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 48aabc8f69..16f63c52a4 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -1618,7 +1618,7 @@ class IndentSearcher(object): tokens = _tokenize.generate_tokens(self.readline) for token in tokens: self.tokeneater(*token) - except _tokenize.TokenError: + except (_tokenize.TokenError, SyntaxError): # since we cut off the tokenizer early, we can trigger # spurious errors pass |