[Python-checkins] r79291 - in python/branches/release26-maint: Lib/ssl.py Misc/NEWS
antoine.pitrou
python-checkins at python.org
Mon Mar 22 16:12:58 CET 2010
Author: antoine.pitrou
Date: Mon Mar 22 16:12:58 2010
New Revision: 79291
Log:
Merged revisions 79226 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79226 | antoine.pitrou | 2010-03-21 20:33:38 +0100 (dim., 21 mars 2010) | 4 lines
Issue #3890: Fix recv() and recv_into() on non-blocking SSL sockets.
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Lib/ssl.py
python/branches/release26-maint/Misc/NEWS
Modified: python/branches/release26-maint/Lib/ssl.py
==============================================================================
--- python/branches/release26-maint/Lib/ssl.py (original)
+++ python/branches/release26-maint/Lib/ssl.py Mon Mar 22 16:12:58 2010
@@ -210,16 +210,9 @@
if self._sslobj:
if flags != 0:
raise ValueError(
- "non-zero flags not allowed in calls to sendall() on %s" %
+ "non-zero flags not allowed in calls to recv() on %s" %
self.__class__)
- while True:
- try:
- return self.read(buflen)
- except SSLError, x:
- if x.args[0] == SSL_ERROR_WANT_READ:
- continue
- else:
- raise x
+ return self.read(buflen)
else:
return socket.recv(self, buflen, flags)
@@ -233,17 +226,10 @@
raise ValueError(
"non-zero flags not allowed in calls to recv_into() on %s" %
self.__class__)
- while True:
- try:
- tmp_buffer = self.read(nbytes)
- v = len(tmp_buffer)
- buffer[:v] = tmp_buffer
- return v
- except SSLError as x:
- if x.args[0] == SSL_ERROR_WANT_READ:
- continue
- else:
- raise x
+ tmp_buffer = self.read(nbytes)
+ v = len(tmp_buffer)
+ buffer[:v] = tmp_buffer
+ return v
else:
return socket.recv_into(self, buffer, nbytes, flags)
Modified: python/branches/release26-maint/Misc/NEWS
==============================================================================
--- python/branches/release26-maint/Misc/NEWS (original)
+++ python/branches/release26-maint/Misc/NEWS Mon Mar 22 16:12:58 2010
@@ -23,6 +23,8 @@
Library
-------
+- Issue #3890: Fix recv() and recv_into() on non-blocking SSL sockets.
+
- Issue #6544: fix a reference leak in the kqueue implementation's error
handling.
More information about the Python-checkins
mailing list