mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
check return for error
This commit is contained in:
parent
77452fc121
commit
d1ab6089ff
1 changed files with 2 additions and 0 deletions
|
@ -3107,6 +3107,8 @@ format_missing(const char *kind, PyCodeObject *co, PyObject *names)
|
||||||
tail = PyUnicode_FromFormat(", %U, and %U",
|
tail = PyUnicode_FromFormat(", %U, and %U",
|
||||||
PyList_GET_ITEM(names, len - 2),
|
PyList_GET_ITEM(names, len - 2),
|
||||||
PyList_GET_ITEM(names, len - 1));
|
PyList_GET_ITEM(names, len - 1));
|
||||||
|
if (tail == NULL)
|
||||||
|
return;
|
||||||
/* Chop off the last two objects in the list. This shouldn't actually
|
/* Chop off the last two objects in the list. This shouldn't actually
|
||||||
fail, but we can't be too careful. */
|
fail, but we can't be too careful. */
|
||||||
err = PyList_SetSlice(names, len - 2, len, NULL);
|
err = PyList_SetSlice(names, len - 2, len, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue