From: Brian Wellington Date: Wed, 8 Jul 2020 20:12:27 +0000 (-0700) Subject: Fix return type docs for receive methods. X-Git-Tag: v2.0.0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=561104fb3445fbd10c3f27857aeb47eeb2b7717c;p=thirdparty%2Fdnspython.git Fix return type docs for receive methods. --- diff --git a/dns/asyncquery.py b/dns/asyncquery.py index b36a2f64..4afe7bcc 100644 --- a/dns/asyncquery.py +++ b/dns/asyncquery.py @@ -121,7 +121,8 @@ async def receive_udp(sock, destination, expiration=None, Raises if the message is malformed, if network errors occur, of if there is a timeout. - Returns a ``dns.message.Message`` object. + Returns a ``(dns.message.Message, float)`` tuple of the received message + and the received time. """ wire = b'' @@ -338,7 +339,8 @@ async def receive_tcp(sock, expiration=None, one_rr_per_rrset=False, Raises if the message is malformed, if network errors occur, of if there is a timeout. - Returns a ``dns.message.Message`` object. + Returns a ``(dns.message.Message, float)`` tuple of the received message + and the received time. """ ldata = await _read_exactly(sock, 2, expiration) diff --git a/dns/query.py b/dns/query.py index 3404b917..13c82461 100644 --- a/dns/query.py +++ b/dns/query.py @@ -431,7 +431,8 @@ def receive_udp(sock, destination, expiration=None, Raises if the message is malformed, if network errors occur, of if there is a timeout. - Returns a ``dns.message.Message`` object. + Returns a ``(dns.message.Message, float)`` tuple of the received message + and the received time. """ wire = b'' @@ -659,7 +660,8 @@ def receive_tcp(sock, expiration=None, one_rr_per_rrset=False, Raises if the message is malformed, if network errors occur, of if there is a timeout. - Returns a ``dns.message.Message`` object. + Returns a ``(dns.message.Message, float)`` tuple of the received message + and the received time. """ ldata = _net_read(sock, 2, expiration)