[Python-checkins] r84351 - python/branches/py3k/Lib/ssl.py

giampaolo.rodola python-checkins at python.org
Sun Aug 29 14:08:13 CEST 2010


Author: giampaolo.rodola
Date: Sun Aug 29 14:08:09 2010
New Revision: 84351

Log:
Raise ValuError if non-zero flag argument is provided for sendall() method for conformity with send(), recv() and recv_into()

Modified:
   python/branches/py3k/Lib/ssl.py

Modified: python/branches/py3k/Lib/ssl.py
==============================================================================
--- python/branches/py3k/Lib/ssl.py	(original)
+++ python/branches/py3k/Lib/ssl.py	Sun Aug 29 14:08:09 2010
@@ -264,6 +264,10 @@
     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):


More information about the Python-checkins mailing list