From: Guido van Rossum Date: Sun, 20 Oct 2013 00:04:25 +0000 (-0700) Subject: (Hopefully) proper fix for gentoo buildbot failure due to lacking AF_INET6 support. X-Git-Tag: v3.4.0a4~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32e46850a1d113f4f2c3d3894396370d6c5cb112;p=python (Hopefully) proper fix for gentoo buildbot failure due to lacking AF_INET6 support. This should supersede revision e3ec6b17260c (but please test before removing that). --- diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 2e00713741..37d50aa233 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -464,7 +464,11 @@ class BaseEventLoop(events.AbstractEventLoop): try: for res in infos: af, socktype, proto, canonname, sa = res - sock = socket.socket(af, socktype, proto) + try: + sock = socket.socket(af, socktype, proto) + except socket.error: + # Assume it's a bad family/type/protocol combination. + continue sockets.append(sock) if reuse_address: sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,