]> granicus.if.org Git - python/commitdiff
(Hopefully) proper fix for gentoo buildbot failure due to lacking AF_INET6 support.
authorGuido van Rossum <guido@dropbox.com>
Sun, 20 Oct 2013 00:04:25 +0000 (17:04 -0700)
committerGuido van Rossum <guido@dropbox.com>
Sun, 20 Oct 2013 00:04:25 +0000 (17:04 -0700)
This should supersede revision e3ec6b17260c (but please test before removing that).

Lib/asyncio/base_events.py

index 2e00713741426aea4ab56b0883fb3e9953f1757d..37d50aa23350ca3a93d53ea68afb119b2d709267 100644 (file)
@@ -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,