Kaydet (Commit) 06d0c1e7 authored tarafından Giampaolo Rodola''s avatar Giampaolo Rodola'

remove uneffective 'while True' clause

üst 1be94cea
...@@ -420,18 +420,17 @@ class SSLSocket(socket): ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment