diff options
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index aed8bb8..e2f384b 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -2922,15 +2922,10 @@ gethost_common(struct hostent *h, struct sockaddr *addr, int alen, int af) } if (h->h_addrtype != af) { -#ifdef HAVE_STRERROR /* Let's get real error message to return */ PyErr_SetString(socket_error, (char *)strerror(EAFNOSUPPORT)); -#else - PyErr_SetString( - socket_error, - "Address family not supported by protocol family"); -#endif + return NULL; } |