diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-03 18:39:47 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-03 18:39:47 (GMT) |
commit | 10c4c23a252294801e44de6d162e3f486baf1784 (patch) | |
tree | b78800aa0cc3e47f9df9138bb770153e5025adff /Lib/ssl.py | |
parent | 23ef20f46140603e372c9bcd78110aa6bb9c361d (diff) | |
download | cpython-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/ssl.py')
-rw-r--r-- | Lib/ssl.py | 6 |
1 files changed, 3 insertions, 3 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'' |