Issue #8793: Prevent IDLE crash in 2.7 when given strings with
invalid hex escape sequences.
diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py
index 1139b30..4c6dc82 100644
--- a/Lib/idlelib/ScriptBinding.py
+++ b/Lib/idlelib/ScriptBinding.py
@@ -101,7 +101,7 @@
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: