From 374f835316251651ddfe7794c9db7afd94fb0ed4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Giampaolo=20Rodol=C3=A0?= Date: Sun, 29 Aug 2010 12:08:09 +0000 Subject: [PATCH] Raise ValuError if non-zero flag argument is provided for sendall() method for conformity with send(), recv() and recv_into() --- Lib/ssl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/ssl.py b/Lib/ssl.py index 5e2da29e63..af1cc840a4 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): -- 2.40.0