mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
only clear the parser error if it's set (closes #12264)
This commit is contained in:
parent
4dfcb1a00d
commit
f719957d7a
2 changed files with 11 additions and 2 deletions
|
@ -581,10 +581,11 @@ parser_do_parse(PyObject *args, PyObject *kw, char *argspec, int type)
|
|||
if (res)
|
||||
((PyST_Object *)res)->st_flags.cf_flags = flags & PyCF_MASK;
|
||||
}
|
||||
else
|
||||
else {
|
||||
PyParser_SetError(&err);
|
||||
PyParser_ClearError(&err);
|
||||
}
|
||||
}
|
||||
PyParser_ClearError(&err);
|
||||
return (res);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue