diff options
author | Frankie Dintino <fdintino@theatlantic.com> | 2012-02-08 15:33:27 -0500 |
---|---|---|
committer | Frankie Dintino <fdintino@theatlantic.com> | 2012-02-08 15:33:27 -0500 |
commit | c56b9e16473aa8e9cd797e483745cb2f99877233 (patch) | |
tree | 38a1fe2d16ea6e2f489980f62bc0448b4535699c /redis/connection.py | |
parent | 8e1a5bb29c48c2fc4e009ad3f90d1a7055c7dfa9 (diff) | |
download | redis-py-c56b9e16473aa8e9cd797e483745cb2f99877233.tar.gz |
Pass the connection encoding to hiredis.Reader
HiredisParser was not previously passing the character encoding to the
hiredis.Reader constructor from redis.connection.Connection (the default
there is 'utf-8').
Diffstat (limited to 'redis/connection.py')
-rw-r--r-- | redis/connection.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/redis/connection.py b/redis/connection.py index 1a5466f..f5b7de6 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -126,7 +126,8 @@ class HiredisParser(object): self._sock = connection._sock self._reader = hiredis.Reader( protocolError=InvalidResponse, - replyError=ResponseError) + replyError=ResponseError, + encoding=connection.encoding) def on_disconnect(self): self._sock = None |