From d29ab8a5cb8ab2c979e29bef87f49a2376a404f5 Mon Sep 17 00:00:00 2001 From: daftshady Date: Mon, 20 Jan 2014 22:33:38 +0900 Subject: [PATCH] removed unnecessary else statements --- tornado/iostream.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tornado/iostream.py b/tornado/iostream.py index 197230f33..1554ddf69 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -219,11 +219,8 @@ class BaseIOStream(object): # write buffer, so we don't have to recopy the entire thing # as we slice off pieces to send to the socket. WRITE_BUFFER_CHUNK_SIZE = 128 * 1024 - if len(data) > WRITE_BUFFER_CHUNK_SIZE: - for i in range(0, len(data), WRITE_BUFFER_CHUNK_SIZE): - self._write_buffer.append(data[i:i + WRITE_BUFFER_CHUNK_SIZE]) - else: - self._write_buffer.append(data) + for i in range(0, len(data), WRITE_BUFFER_CHUNK_SIZE): + self._write_buffer.append(data[i:i + WRITE_BUFFER_CHUNK_SIZE]) self._write_callback = stack_context.wrap(callback) if not self._connecting: self._handle_write() -- 2.47.2