Bug #1346533, select.poll() doesn't raise an error if timeout > sys.maxint

Need to check return result of PyInt_AsLong()

Will backport.
This commit is contained in:
Neal Norwitz 2005-11-03 05:00:25 +00:00
parent 26f4c23074
commit 0f46bbf781
3 changed files with 24 additions and 0 deletions

View file

@ -470,6 +470,8 @@ poll_poll(pollObject *self, PyObject *args)
return NULL;
timeout = PyInt_AsLong(tout);
Py_DECREF(tout);
if (timeout == -1 && PyErr_Occurred())
return NULL;
}
/* Ensure the ufd array is up to date */