Skip to content

Instantly share code, notes, and snippets.

@namoopsoo
Created June 17, 2014 18:08
Show Gist options
  • Save namoopsoo/fea6157ad4197cf25f24 to your computer and use it in GitHub Desktop.
Save namoopsoo/fea6157ad4197cf25f24 to your computer and use it in GitHub Desktop.
A snippet of very strange output from hgetall()
'''
This is a brief output snippet associated with https://github.com/andymccurdy/redis-py/issues/496
'''
rdb_cnxn = redis.ConnectionPool(host='localhost', port=6379, db=1)
rdb = redis.StrictRedis(connection_pool=rdb_cnxn)
output = rdb.hgetall('my_classes')
'''
The contents of output, as captured by the wrapper code in
https://gist.github.com/namoopsoo/b9f082e9eac025f7ec3b
{'(CLOSE_WAIT)': '(ESTABLISHED)',
'(ESTABLISHED)': '(ESTABLISHED)',
'(LISTEN)': '(CLOSE_WAIT)'}
This caused an error in the code that consumes this output.
But a follow-up hgetall to rdb retrieved the output that was expected, which has nothing to do with what was previously received.
{'737820c7': 'new_class0', '6cc91476': 'Rating_Organization'}
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment