mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
remove uneffective 'while True' clause
This commit is contained in:
parent
1be94cea0f
commit
06d0c1e72c
1 changed files with 10 additions and 11 deletions
21
Lib/ssl.py
21
Lib/ssl.py
|
|
@ -420,18 +420,17 @@ class SSLSocket(socket):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"non-zero flags not allowed in calls to send() on %s" %
|
"non-zero flags not allowed in calls to send() on %s" %
|
||||||
self.__class__)
|
self.__class__)
|
||||||
while True:
|
try:
|
||||||
try:
|
v = self._sslobj.write(data)
|
||||||
v = self._sslobj.write(data)
|
except SSLError as x:
|
||||||
except SSLError as x:
|
if x.args[0] == SSL_ERROR_WANT_READ:
|
||||||
if x.args[0] == SSL_ERROR_WANT_READ:
|
return 0
|
||||||
return 0
|
elif x.args[0] == SSL_ERROR_WANT_WRITE:
|
||||||
elif x.args[0] == SSL_ERROR_WANT_WRITE:
|
return 0
|
||||||
return 0
|
|
||||||
else:
|
|
||||||
raise
|
|
||||||
else:
|
else:
|
||||||
return v
|
raise
|
||||||
|
else:
|
||||||
|
return v
|
||||||
else:
|
else:
|
||||||
return socket.send(self, data, flags)
|
return socket.send(self, data, flags)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue