summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2012-12-27 19:34:23 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2012-12-27 19:34:23 (GMT)
commit61006a211339f592dcb60f20ee7e478ad012556d (patch)
tree417521809a9444ae274cdcd8bf4dc3e4979d6c7e /Lib/idlelib/EditorWindow.py
parent4a5a4c28085910c6a40e40f01d763d55f5190e38 (diff)
downloadcpython-61006a211339f592dcb60f20ee7e478ad012556d.zip
cpython-61006a211339f592dcb60f20ee7e478ad012556d.tar.gz
cpython-61006a211339f592dcb60f20ee7e478ad012556d.tar.bz2
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py2
1 files changed, 1 insertions, 1 deletions
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 @@ 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