mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merged revisions 84464 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84464 | antoine.pitrou | 2010-09-03 20:38:17 +0200 (ven., 03 sept. 2010) | 3 lines Issue #3805: clean up implementation of the _read method in _ssl.c. ........
This commit is contained in:
parent
23ef20f461
commit
10c4c23a25
2 changed files with 33 additions and 32 deletions
|
@ -162,14 +162,14 @@ class SSLSocket(socket):
|
|||
|
||||
self._checkClosed()
|
||||
try:
|
||||
if buffer:
|
||||
v = self._sslobj.read(buffer, len)
|
||||
if buffer is not None:
|
||||
v = self._sslobj.read(len, buffer)
|
||||
else:
|
||||
v = self._sslobj.read(len or 1024)
|
||||
return v
|
||||
except SSLError as x:
|
||||
if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs:
|
||||
if buffer:
|
||||
if buffer is not None:
|
||||
return 0
|
||||
else:
|
||||
return b''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue