summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-03 18:39:47 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-03 18:39:47 (GMT)
commit10c4c23a252294801e44de6d162e3f486baf1784 (patch)
treeb78800aa0cc3e47f9df9138bb770153e5025adff /Lib
parent23ef20f46140603e372c9bcd78110aa6bb9c361d (diff)
downloadcpython-10c4c23a252294801e44de6d162e3f486baf1784.zip
cpython-10c4c23a252294801e44de6d162e3f486baf1784.tar.gz
cpython-10c4c23a252294801e44de6d162e3f486baf1784.tar.bz2
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. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ssl.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index ec64469..0ba3442 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -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''