diff Modules/selectmodule.c @ 35836:fd08918394f9 2.4

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()
author Neal Norwitz <nnorwitz@gmail.com>
date Thu, 03 Nov 2005 05:11:17 +0000
parents 9fb2e30f26be
children 1af7f719ed28
line wrap: on
line diff
--- a/Modules/selectmodule.c	Thu Nov 03 04:39:46 2005 +0000
+++ b/Modules/selectmodule.c	Thu Nov 03 05:11:17 2005 +0000
@@ -470,6 +470,8 @@
 			return NULL;
 		timeout = PyInt_AsLong(tout);
 		Py_DECREF(tout);
+		if (timeout == -1 && PyErr_Occurred())
+			return NULL;
 	}
 
 	/* Ensure the ufd array is up to date */