summaryrefslogtreecommitdiffstats
path: root/Lib/socket.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-02-16 23:06:19 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-02-16 23:06:19 (GMT)
commite12454f44afbb7d48aecb9d479fcb2fb4799499f (patch)
tree5f67ec0019bed3aa130e25882158e6579ce5da49 /Lib/socket.py
parent976ade691ceef24b167c7617b50c0bd9b176e594 (diff)
downloadcpython-e12454f44afbb7d48aecb9d479fcb2fb4799499f.zip
cpython-e12454f44afbb7d48aecb9d479fcb2fb4799499f.tar.gz
cpython-e12454f44afbb7d48aecb9d479fcb2fb4799499f.tar.bz2
The Grande 'sendall()' patch, copied from release21-maint. Fixes #516715.
Replaces calls to socket.send() (which isn't guaranteed to send all data) with the new socket.sendall() method.
Diffstat (limited to 'Lib/socket.py')
-rw-r--r--Lib/socket.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/socket.py b/Lib/socket.py
index c460c5f..45131ce 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -185,7 +185,7 @@ class _fileobject:
def flush(self):
if self._wbuf:
- self._sock.send(self._wbuf)
+ self._sock.sendall(self._wbuf)
self._wbuf = ""
def fileno(self):
@@ -201,7 +201,7 @@ class _fileobject:
self.flush()
def writelines(self, list):
- filter(self._sock.send, list)
+ filter(self._sock.sendall, list)
self.flush()
def read(self, n=-1):