mirror of https://github.com/python/cpython
Remove unnecessary while in SocketIO.readinto (GH-111057)
It is unnecessary after removing "continue" in 6e6c59b
(bpo-42357).
This commit is contained in:
parent
c9aef19cbf
commit
677d4bc15e
|
@ -702,16 +702,15 @@ class SocketIO(io.RawIOBase):
|
|||
self._checkReadable()
|
||||
if self._timeout_occurred:
|
||||
raise OSError("cannot read from timed out object")
|
||||
while True:
|
||||
try:
|
||||
return self._sock.recv_into(b)
|
||||
except timeout:
|
||||
self._timeout_occurred = True
|
||||
raise
|
||||
except error as e:
|
||||
if e.errno in _blocking_errnos:
|
||||
return None
|
||||
raise
|
||||
try:
|
||||
return self._sock.recv_into(b)
|
||||
except timeout:
|
||||
self._timeout_occurred = True
|
||||
raise
|
||||
except error as e:
|
||||
if e.errno in _blocking_errnos:
|
||||
return None
|
||||
raise
|
||||
|
||||
def write(self, b):
|
||||
"""Write the given bytes or bytearray object *b* to the socket
|
||||
|
|
Loading…
Reference in New Issue