diff Modules/socketmodule.c @ 66663:3d9a86b8cc98

Issue #10272: The ssl module now raises socket.timeout instead of a generic SSLError on socket timeouts.
author Antoine Pitrou <solipsis@pitrou.net>
date Fri, 03 Dec 2010 19:59:41 +0000
parents 49b0d423023e
children 50d170bb71c7
line wrap: on
line diff
--- a/Modules/socketmodule.c	Fri Dec 03 19:56:42 2010 +0000
+++ b/Modules/socketmodule.c	Fri Dec 03 19:59:41 2010 +0000
@@ -4358,6 +4358,7 @@
 PySocketModule_APIObject PySocketModuleAPI =
 {
     &sock_type,
+    NULL,
     NULL
 };
 
@@ -4425,6 +4426,7 @@
                                         socket_error, NULL);
     if (socket_timeout == NULL)
         return NULL;
+    PySocketModuleAPI.timeout_error = socket_timeout;
     Py_INCREF(socket_timeout);
     PyModule_AddObject(m, "timeout", socket_timeout);
     Py_INCREF((PyObject *)&sock_type);