diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-03 18:38:17 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-09-03 18:38:17 (GMT) |
commit | 24e561ae0473ad6f46709e38ed8ebc97d89fc55e (patch) | |
tree | 7e536c12b8cc11641329f5354234bf627c943867 /Lib | |
parent | aa44b2b5ca45eaa0287fd59c62ed964550b7da96 (diff) | |
download | cpython-24e561ae0473ad6f46709e38ed8ebc97d89fc55e.zip cpython-24e561ae0473ad6f46709e38ed8ebc97d89fc55e.tar.gz cpython-24e561ae0473ad6f46709e38ed8ebc97d89fc55e.tar.bz2 |
Issue #3805: clean up implementation of the _read method in _ssl.c.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/ssl.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -199,14 +199,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'' |