mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
Merge 3.6
This commit is contained in:
commit
d5f599a392
2 changed files with 27 additions and 1 deletions
|
@ -4129,7 +4129,13 @@ warn_invalid_escape_sequence(struct compiling *c, const node *n,
|
|||
NULL, NULL) < 0 &&
|
||||
PyErr_ExceptionMatches(PyExc_DeprecationWarning))
|
||||
{
|
||||
const char *s = PyUnicode_AsUTF8(msg);
|
||||
const char *s;
|
||||
|
||||
/* Replace the DeprecationWarning exception with a SyntaxError
|
||||
to get a more accurate error report */
|
||||
PyErr_Clear();
|
||||
|
||||
s = PyUnicode_AsUTF8(msg);
|
||||
if (s != NULL) {
|
||||
ast_error(c, n, s);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue