Mercurial > hg-stable
diff tests/run-tests.py @ 49047:c194e93d1ebc
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
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Wed, 09 Mar 2022 21:26:58 -0800 |
parents | 642e31cb55f0 |
children | 7e18fc0bc46c |
line wrap: on
line diff
--- 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