diff options
Diffstat (limited to 'redis/connection.py')
-rwxr-xr-x | redis/connection.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/redis/connection.py b/redis/connection.py index 728a627..77eb44d 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -394,6 +394,7 @@ class HiredisParser(BaseParser): raise response[0] return response + if HIREDIS_AVAILABLE: DefaultParser = HiredisParser else: @@ -955,6 +956,15 @@ class ConnectionPool(object): self._in_use_connections.add(connection) return connection + def get_encoding(self): + "Return information about the encoding settings" + kwargs = self.connection_kwargs + return { + 'encoding': kwargs.get('encoding', 'utf-8'), + 'encoding_errors': kwargs.get('encoding_errors', 'strict'), + 'decode_responses': kwargs.get('decode_responses', False) + } + def make_connection(self): "Create a new connection" if self._created_connections >= self.max_connections: |