Skip to content

Commit

Permalink
Merge pull request #240 from danimar-nextroll/patch-1
Browse files Browse the repository at this point in the history
Decode responses from redis
  • Loading branch information
thrawn01 authored Mar 16, 2020
2 parents 2f0e742 + 08a2a01 commit 63d1cdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flanker/addresslib/drivers/redis_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def __init__(self, host=None, port=None, prefix='mxr:', ttl=604800):
host = host or os.environ.get('REDIS_HOST', 'localhost')
port = port or os.environ.get('REDIS_PORT', 6379)
db = os.environ.get('REDIS_DB', 0)
self.r = redis.StrictRedis(host=host, port=port, db=db)
decode_resp = os.environ.get('REDIS_DECODE_RESPONSES', False)
self.r = redis.StrictRedis(host=host, port=port, db=db, decode_responses=decode_resp)

def __getitem__(self, key):
try:
Expand Down

0 comments on commit 63d1cdf

Please sign in to comment.