Issue #8793: Prevent IDLE crash in 2.7 when given strings with

invalid hex escape sequences.
This commit is contained in:
Ned Deily 2011-11-15 18:29:02 -08:00
parent 30402549de
commit 174c4f897f
2 changed files with 4 additions and 1 deletions

View File

@ -101,7 +101,7 @@ class ScriptBinding:
try: try:
# If successful, return the compiled code # If successful, return the compiled code
return compile(source, filename, "exec") return compile(source, filename, "exec")
except (SyntaxError, OverflowError), err: except (SyntaxError, OverflowError, ValueError), err:
try: try:
msg, (errorfilename, lineno, offset, line) = err msg, (errorfilename, lineno, offset, line) = err
if not errorfilename: if not errorfilename:

View File

@ -79,6 +79,9 @@ Core and Builtins
Library Library
------- -------
- Issue #8793: Prevent IDLE crash when given strings with invalid hex escape
sequences.
- Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly - Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly
handles non-valid attributes, including adjacent and unquoted attributes. handles non-valid attributes, including adjacent and unquoted attributes.