From: Bob Halley Date: Fri, 12 Jun 2020 14:39:04 +0000 (-0700) Subject: read_exactly -> _read_exactly X-Git-Tag: v2.0.0rc1~112^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90cb629c04ce5e424ea145c5e76e3f8b4c4d7334;p=thirdparty%2Fdnspython.git read_exactly -> _read_exactly --- diff --git a/dns/asyncquery.py b/dns/asyncquery.py index b9f7212f..47a4ff06 100644 --- a/dns/asyncquery.py +++ b/dns/asyncquery.py @@ -300,7 +300,7 @@ async def send_tcp(sock, what, expiration=None): return (len(tcpmsg), sent_time) -async def read_exactly(sock, count, expiration): +async def _read_exactly(sock, count, expiration): """Read the specified number of bytes from stream. Keep trying until we either get the desired amount, or we hit EOF. """ @@ -340,9 +340,9 @@ async def receive_tcp(sock, expiration=None, one_rr_per_rrset=False, Returns a ``dns.message.Message`` object. """ - ldata = await read_exactly(sock, 2, expiration) + ldata = await _read_exactly(sock, 2, expiration) (l,) = struct.unpack("!H", ldata) - wire = await read_exactly(sock, l, expiration) + wire = await _read_exactly(sock, l, expiration) received_time = time.time() r = dns.message.from_wire(wire, keyring=keyring, request_mac=request_mac, one_rr_per_rrset=one_rr_per_rrset,