summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2012-12-27 19:54:19 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2012-12-27 19:54:19 (GMT)
commitffa1795461b2a6e06c7a29fe8e8250c383ee34e7 (patch)
treec945f5f5d24b5597e7784994253965e082973af9 /Lib/idlelib/EditorWindow.py
parent464a218e77bb2b9189774d46be495d7771bc50a2 (diff)
parent64df4a1c454967aaf42a6c34598eccec0561fb8b (diff)
downloadcpython-ffa1795461b2a6e06c7a29fe8e8250c383ee34e7.zip
cpython-ffa1795461b2a6e06c7a29fe8e8250c383ee34e7.tar.gz
cpython-ffa1795461b2a6e06c7a29fe8e8250c383ee34e7.tar.bz2
Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE.
Patch by Roger Serwy.
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 aed4d6a..565cf36 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -1621,7 +1621,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