Mercurial > cpython-lru_cache-weakref
diff Lib/socket.py @ 81034:5be3fa83d436 2.7
issue #879399
Fix line buffering of socket._fileobject
| author | Kristján Valur Jónsson <kristjan@ccpgames.com> |
|---|---|
| date | Tue, 25 Dec 2012 13:04:50 +0000 |
| parents | b36cb4602e21 |
| children |
line wrap: on
line diff
--- a/Lib/socket.py Tue Dec 25 14:45:55 2012 +0200 +++ b/Lib/socket.py Tue Dec 25 13:04:50 2012 +0000 @@ -319,8 +319,8 @@ self._wbuf.append(data) self._wbuf_len += len(data) if (self._wbufsize == 0 or - self._wbufsize == 1 and '\n' in data or - self._wbuf_len >= self._wbufsize): + (self._wbufsize == 1 and '\n' in data) or + (self._wbufsize > 1 and self._wbuf_len >= self._wbufsize)): self.flush() def writelines(self, list):
