Skip to content

Commit

Permalink
fix some landscape.io warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thefab committed Sep 1, 2014
1 parent 9476164 commit 567c746
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tornadis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import tornado.gen
import hiredis
import toro
from six.moves import range as six_range

from tornadis.connection import Connection
from tornadis.pipeline import Pipeline
Expand All @@ -19,7 +18,7 @@

class Client(object):

def __init__(self, host='localhost', port=6379, ioloop=None, pool=None):
def __init__(self, host='localhost', port=6379, ioloop=None):
self.host = host
self.port = port
self.__reply_queue = toro.Queue()
Expand Down Expand Up @@ -75,7 +74,9 @@ def _pipelined_call(self, pipeline):
msg = format_args_in_redis_protocol(*args)
yield self.__connection.write(msg)
result = []
for i in six_range(0, pipeline.number_of_stacked_calls):
i = 0
while i < pipeline.number_of_stacked_calls:
reply = yield self.__reply_queue.get()
result.append(reply)
i = i + 1
raise tornado.gen.Return(result)

0 comments on commit 567c746

Please sign in to comment.