Issue #10272: The ssl module now raises socket.timeout instead of a generic

SSLError on socket timeouts.
This commit is contained in:
Antoine Pitrou 2010-12-03 19:59:41 +00:00
parent 500be24a64
commit c4df784514
5 changed files with 15 additions and 9 deletions

View file

@ -4358,6 +4358,7 @@ static
PySocketModule_APIObject PySocketModuleAPI =
{
&sock_type,
NULL,
NULL
};
@ -4425,6 +4426,7 @@ PyInit__socket(void)
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);