leporo / tornado-redis

Asynchronous Redis client that works within Tornado IO loop.
666 stars 162 forks source link

fix keys arg in eval command #68

Closed jettify closed 10 years ago

jettify commented 10 years ago

Hi Vlad! I've noticed that eval command has undesired behavior:

keys = ['key1', 'key2']
args = ['arg1', 'arg2']
yield gen.Task(self.client.eval, script, keys, args)
print(keys)
>>> ['key1', 'key2', 'arg1', 'arg2']

since keys is mutable list, any changes inside eval command affect outside keys variable. so here patch and test to fix this issue. Please review.

leporo commented 10 years ago

Thank you