mirror of
https://github.com/python/cpython.git
synced 2025-09-25 17:59:57 +00:00
#7842: backport fix for py_compile.compile syntax error message handling.
This commit is contained in:
parent
5aff27aec1
commit
c32b678fd0
2 changed files with 3 additions and 1 deletions
|
@ -112,7 +112,7 @@ def compile(file, cfile=None, dfile=None, doraise=False):
|
||||||
try:
|
try:
|
||||||
codeobject = __builtin__.compile(codestring, dfile or file,'exec')
|
codeobject = __builtin__.compile(codestring, dfile or file,'exec')
|
||||||
except Exception,err:
|
except Exception,err:
|
||||||
py_exc = PyCompileError(err.__class__,err.args,dfile or file)
|
py_exc = PyCompileError(err.__class__, err, dfile or file)
|
||||||
if doraise:
|
if doraise:
|
||||||
raise py_exc
|
raise py_exc
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -208,6 +208,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #7842: backported fix for py_compile.compile() syntax error handling.
|
||||||
|
|
||||||
- Issue #13153: Tkinter functions now raise TclError instead of ValueError when
|
- Issue #13153: Tkinter functions now raise TclError instead of ValueError when
|
||||||
a unicode argument contains non-BMP character.
|
a unicode argument contains non-BMP character.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue