summaryrefslogtreecommitdiff
path: root/Modules/selectmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r--Modules/selectmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 81c9e3cd98..ed2ea8197c 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 */