]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Raise ValuError if non-zero flag argument is provided for sendall() method for confor...
authorGiampaolo Rodolà <g.rodola@gmail.com>
Sun, 29 Aug 2010 12:08:09 +0000 (12:08 +0000)
committerGiampaolo Rodolà <g.rodola@gmail.com>
Sun, 29 Aug 2010 12:08:09 +0000 (12:08 +0000)
Lib/ssl.py

index 5e2da29e639b0405f15858108430b5c43d5c8eab..af1cc840a437f78e99da069049ad5523bec26e82 100644 (file)
@@ -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):