summaryrefslogtreecommitdiffstats
path: root/Lib/ssl.py
diff options
context:
space:
mode:
authorGiampaolo RodolĂ  <g.rodola@gmail.com>2010-08-29 12:08:09 (GMT)
committerGiampaolo RodolĂ  <g.rodola@gmail.com>2010-08-29 12:08:09 (GMT)
commit374f835316251651ddfe7794c9db7afd94fb0ed4 (patch)
treef91f63606c6158f532497a5c9083144356906f95 /Lib/ssl.py
parent67c7ce4bef3223af744d2b510d294000ce00388d (diff)
downloadcpython-374f835316251651ddfe7794c9db7afd94fb0ed4.zip
cpython-374f835316251651ddfe7794c9db7afd94fb0ed4.tar.gz
cpython-374f835316251651ddfe7794c9db7afd94fb0ed4.tar.bz2
Raise ValuError if non-zero flag argument is provided for sendall() method for conformity with send(), recv() and recv_into()
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 5e2da29..af1cc84 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -264,6 +264,10 @@ class SSLSocket(socket):
def sendall(self, data, flags=0):
self._checkClosed()
if self._sslobj:
+ if flags != 0:
+ raise ValueError(
+ "non-zero flags not allowed in calls to sendall() on %s" %
+ self.__class__)
amount = len(data)
count = 0
while (count < amount):