mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112)
This commit is contained in:
parent
a180b007d9
commit
a24107b04c
31 changed files with 538 additions and 242 deletions
|
@ -499,9 +499,11 @@ select_poll_modify_impl(pollObject *self, int fd, unsigned short eventmask)
|
|||
key = PyLong_FromLong(fd);
|
||||
if (key == NULL)
|
||||
return NULL;
|
||||
if (PyDict_GetItem(self->dict, key) == NULL) {
|
||||
errno = ENOENT;
|
||||
PyErr_SetFromErrno(PyExc_OSError);
|
||||
if (PyDict_GetItemWithError(self->dict, key) == NULL) {
|
||||
if (!PyErr_Occurred()) {
|
||||
errno = ENOENT;
|
||||
PyErr_SetFromErrno(PyExc_OSError);
|
||||
}
|
||||
Py_DECREF(key);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue