diff options
| author | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-12-25 13:04:50 (GMT) |
|---|---|---|
| committer | Kristján Valur Jónsson <kristjan@ccpgames.com> | 2012-12-25 13:04:50 (GMT) |
| commit | 2380feeff8e574690831d2eb778ca52d3af09b8a (patch) | |
| tree | 4e753854f2cfb21f132cdc57d8d6310f638335fc /Lib/socket.py | |
| parent | 513e9b4f610cc4b1edd7d6890d65b05aaba41188 (diff) | |
| download | cpython-2380feeff8e574690831d2eb778ca52d3af09b8a.zip cpython-2380feeff8e574690831d2eb778ca52d3af09b8a.tar.gz cpython-2380feeff8e574690831d2eb778ca52d3af09b8a.tar.bz2 | |
issue #879399
Fix line buffering of socket._fileobject
Diffstat (limited to 'Lib/socket.py')
| -rw-r--r-- | Lib/socket.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index bd364e7..aac04f6 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -319,8 +319,8 @@ class _fileobject(object): 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): |
