fiorix/txredisapi — pull request #18 by steiza (2012-06-04 23:45:58+00:00)
Title: Fixing issue with mget

I was having issues with txredisapi if a value in the middle of a mget is not set (here's a simple example):

from twisted.internet import defer, reactor
import txredisapi

@defer.inlineCallbacks
def main():
r = yield txredisapi.Connection('127.0.0.1')
yield r.flushdb()

yield r.set('key1', 'val1')
yield r.set('key3', 'val3')

ret = yield r.mget(['key1', 'key2', 'key3'])

print 'Got back:'
for each in ret:
print repr(each)

if __name__ == '__main__':
main()
reactor.run()

This should return ['val1', None, 'val3'], but instead it hangs. This pull request fixes that and adds a unit test for this situation as well.