# HG changeset patch # User Kyle Lippincott # Date 1646890018 28800 # Node ID c194e93d1ebc963ea69182bed29787161898b5c8 # Parent db960032d522a0dede68734f399bf13b0a661415 tests: support another error case when detecting ipv4/ipv6 support I encountered this on Linux in a VM environment with a rather strange networking setup (both on the host and in the VM). Differential Revision: https://phab.mercurial-scm.org/D12371 diff -r db960032d522 -r c194e93d1ebc tests/run-tests.py --- a/tests/run-tests.py Wed Mar 09 16:44:48 2022 +0100 +++ b/tests/run-tests.py Wed Mar 09 21:26:58 2022 -0800 @@ -238,10 +238,11 @@ s.bind(('localhost', port)) s.close() return True - except socket.error as exc: + except (socket.error, OSError) as exc: if exc.errno == errno.EADDRINUSE: return True - elif exc.errno in (errno.EADDRNOTAVAIL, errno.EPROTONOSUPPORT): + elif exc.errno in (errno.EADDRNOTAVAIL, errno.EPROTONOSUPPORT, + errno.EAFNOSUPPORT): return False else: raise