mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #10272: The ssl module now raises socket.timeout instead of a generic
SSLError on socket timeouts.
This commit is contained in:
parent
500be24a64
commit
c4df784514
5 changed files with 15 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue