From: daftshady Date: Mon, 20 Jan 2014 13:33:38 +0000 (+0900) Subject: removed unnecessary else statements X-Git-Tag: v4.0.0b1~138^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d29ab8a5cb8ab2c979e29bef87f49a2376a404f5;p=thirdparty%2Ftornado.git removed unnecessary else statements --- 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()