commit | 61006a211339f592dcb60f20ee7e478ad012556d | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Thu Dec 27 21:34:23 2012 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Thu Dec 27 21:34:23 2012 +0200 |
tree | 417521809a9444ae274cdcd8bf4dc3e4979d6c7e | |
parent | 4a5a4c28085910c6a40e40f01d763d55f5190e38 [diff] [blame] |
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index efd3c54..0a01c9e 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py
@@ -1611,7 +1611,7 @@ 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