summaryrefslogtreecommitdiff
path: root/Lib/idlelib/ScriptBinding.py
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2011-11-15 18:29:02 -0800
committerNed Deily <nad@acm.org>2011-11-15 18:29:02 -0800
commit174c4f897fd05b8f838cb4db928295f23ab4b033 (patch)
tree8ff53d6aabfe549b39138e778dab90e192400313 /Lib/idlelib/ScriptBinding.py
parent30402549de68a5303a5e2995dca7375d3d17966f (diff)
downloadcpython-git-174c4f897fd05b8f838cb4db928295f23ab4b033.tar.gz
Issue #8793: Prevent IDLE crash in 2.7 when given strings with
invalid hex escape sequences.
Diffstat (limited to 'Lib/idlelib/ScriptBinding.py')
-rw-r--r--Lib/idlelib/ScriptBinding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py
index 1139b30784..4c6dc82e0f 100644
--- a/Lib/idlelib/ScriptBinding.py
+++ b/Lib/idlelib/ScriptBinding.py
@@ -101,7 +101,7 @@ class ScriptBinding:
try:
# If successful, return the compiled code
return compile(source, filename, "exec")
- except (SyntaxError, OverflowError), err:
+ except (SyntaxError, OverflowError, ValueError), err:
try:
msg, (errorfilename, lineno, offset, line) = err
if not errorfilename: