summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-11-03 05:11:17 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2005-11-03 05:11:17 (GMT)
commit6e4524f633aa139c005d0d9c01858319ac96d851 (patch)
tree90136b1e3e48247754905ca991b6e75e57fe5631 /Modules
parente361d8afd016e5874ed5ce4302df88225babdb58 (diff)
downloadcpython-6e4524f633aa139c005d0d9c01858319ac96d851.zip
cpython-6e4524f633aa139c005d0d9c01858319ac96d851.tar.gz
cpython-6e4524f633aa139c005d0d9c01858319ac96d851.tar.bz2
Backport (with output/test_poll):
Bug #1346533, select.poll() doesn't raise an error if timeout > sys.maxint Need to check return result of PyInt_AsLong()
Diffstat (limited to 'Modules')
-rw-r--r--Modules/selectmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 81c9e3c..ed2ea81 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -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 */