Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 20804:0629666e65c5 2.1
backport (partially) jeremy's 1.178
Use PySocket_Err() instead of PyErr_SetFromErrno().
The former does the right thing on Windows, the latter does not.
The 'partial' is because the code's changed quite a lot and it's not clear
that the two that are still there of the form
return PyErr_SetFromErrno(SSLErrorObject);
can be replaced with PySocket_Err() - it looks like they need the new
PySSL_SetError, which is a tad large to be comfortable with just checking
in without reading it further.
| author | Anthony Baxter <anthonybaxter@gmail.com> |
|---|---|
| date | Thu, 01 Nov 2001 13:58:16 +0000 |
| parents | d06446d4e78d |
| children | 076e5e49e27d |
line wrap: on
line diff
--- a/Modules/socketmodule.c Thu Nov 01 13:34:10 2001 +0000 +++ b/Modules/socketmodule.c Thu Nov 01 13:58:16 2001 +0000 @@ -707,7 +707,7 @@ strncpy(ifr.ifr_name, interfaceName, sizeof(ifr.ifr_name)); ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0'; if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) { - PyErr_SetFromErrno(PySocket_Error); + PySocket_Err(); return 0; } addr = &(s->sock_addr.ll);
