From ad4d2bcd39ef561bb75c721748fb26cafd4c625a Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sun, 26 Jul 2020 11:03:19 -0700 Subject: [PATCH] exclude unpractical-to-test AttributeError --- dns/inet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/inet.py b/dns/inet.py index 25d99c2c..d3bdc64c 100644 --- a/dns/inet.py +++ b/dns/inet.py @@ -162,7 +162,7 @@ def low_level_address_tuple(high_tuple, af=None): return (addrpart, port, 0, int(scope)) try: return (addrpart, port, 0, socket.if_nametoindex(scope)) - except AttributeError: + except AttributeError: # pragma: no cover (we can't really test this) ai_flags = socket.AI_NUMERICHOST ((*_, tup), *_) = socket.getaddrinfo(address, port, flags=ai_flags) return tup -- 2.47.3