]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
fix breakage from receive_udp cleanup
authorBob Halley <halley@dnspython.org>
Mon, 16 Jan 2017 15:18:18 +0000 (07:18 -0800)
committerBob Halley <halley@dnspython.org>
Mon, 16 Jan 2017 15:18:18 +0000 (07:18 -0800)
dns/query.py

index 497111063aba03e3340431f1a8757b247d4c8008..daf36deabbeec4e1658cf44c2837fb2f1031fb89 100644 (file)
@@ -242,7 +242,7 @@ def receive_udp(sock, destination, expiration=None,
     while 1:
         _wait_for_readable(sock, expiration)
         (wire, from_address) = sock.recvfrom(65535)
-        if _addresses_equal(socket.family, from_address, destination) or \
+        if _addresses_equal(sock.family, from_address, destination) or \
            (dns.inet.is_multicast(destination[0]) and
             from_address[1:] == destination[1:]):
             break
@@ -301,7 +301,7 @@ def udp(q, where, timeout=None, port=53, af=None, source=None, source_port=0,
         if source is not None:
             s.bind(source)
         (_, sent_time) = send_udp(s, wire, destination, expiration)
-        (r, received_time) = receive_udp(s, destination, expiration, af,
+        (r, received_time) = receive_udp(s, destination, expiration,
                                          ignore_unexpected, one_rr_per_rrset,
                                          q.keyring, q.request_mac)
     finally: