Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue with mget #18

Merged
merged 1 commit into from
Jun 5, 2012
Merged

Fixing issue with mget #18

merged 1 commit into from
Jun 5, 2012

Conversation

steiza
Copy link
Contributor

@steiza steiza commented Jun 4, 2012

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.

gleicon added a commit that referenced this pull request Jun 5, 2012
@gleicon gleicon merged commit 154e2ea into IlyaSkriblovsky:master Jun 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants