Skip to content

Commit

Permalink
removed unnecessary else statements
Browse files Browse the repository at this point in the history
  • Loading branch information
daftshady committed Jan 20, 2014
1 parent 4057cc7 commit d29ab8a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tornado/iostream.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,8 @@ def write(self, data, callback=None):
# 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()
Expand Down

0 comments on commit d29ab8a

Please sign in to comment.