]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
exclude unpractical-to-test AttributeError
authorBob Halley <halley@dnspython.org>
Sun, 26 Jul 2020 18:03:19 +0000 (11:03 -0700)
committerBob Halley <halley@dnspython.org>
Sun, 26 Jul 2020 18:03:19 +0000 (11:03 -0700)
dns/inet.py

index 25d99c2cd43de3c28e6a0a5aa43982618b77c959..d3bdc64c8800c9cb6741406f23be753fb6329326 100644 (file)
@@ -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