summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-03 18:38:17 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-03 18:38:17 (GMT)
commit24e561ae0473ad6f46709e38ed8ebc97d89fc55e (patch)
tree7e536c12b8cc11641329f5354234bf627c943867 /Lib
parentaa44b2b5ca45eaa0287fd59c62ed964550b7da96 (diff)
downloadcpython-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.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index e83d889..0c609be 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -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''