diff options
| author | Bob Halley <halley@dnspython.org> | 2020-06-16 19:37:01 -0700 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2020-06-16 19:37:01 -0700 |
| commit | 651592faa7d305edde5d47100e179246d83d2a79 (patch) | |
| tree | 6b62cb9fc55f419f8c5e61d2c34a91814b857607 /dns/inet.py | |
| parent | 5fb5625e948e54ca77b7aac8645536189502721b (diff) | |
| download | dnspython-651592faa7d305edde5d47100e179246d83d2a79.tar.gz | |
The dns.inet.AF_* portability scheme is no longer needed.
Diffstat (limited to 'dns/inet.py')
| -rw-r--r-- | dns/inet.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/dns/inet.py b/dns/inet.py index 048a80c..25d99c2 100644 --- a/dns/inet.py +++ b/dns/inet.py @@ -22,18 +22,12 @@ import socket import dns.ipv4 import dns.ipv6 -# We assume that AF_INET is always defined. +# We assume that AF_INET and AF_INET6 are always defined. We keep +# these here for the benefit of any old code (unlikely though that +# is!). AF_INET = socket.AF_INET - -# AF_INET6 might not be defined in the socket module, but we need it. -# We'll try to use the socket module's value, and if it doesn't work, -# we'll use our own value. - -try: - AF_INET6 = socket.AF_INET6 -except AttributeError: - AF_INET6 = 9999 # type: ignore +AF_INET6 = socket.AF_INET6 def inet_pton(family, text): |
