summaryrefslogtreecommitdiff
path: root/redis/connection.py
diff options
context:
space:
mode:
authorEric Du <eric@honovation.com>2015-05-04 10:28:24 +0800
committerEric Du <eric@honovation.com>2015-05-04 10:28:24 +0800
commit19d48d81ce3227d5f9544072c9c6915133b0f75c (patch)
treea2a9a4ae808342ad67df92ea17094f708976d673 /redis/connection.py
parentbc61eb925af5de3317937529413cca4a49c4cd3b (diff)
downloadredis-py-19d48d81ce3227d5f9544072c9c6915133b0f75c.tar.gz
fix: Connection.encode complains when value is an object having unicode characters in its printable representation
Diffstat (limited to 'redis/connection.py')
-rwxr-xr-xredis/connection.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/connection.py b/redis/connection.py
index 790997b..0229d28 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -588,7 +588,7 @@ class Connection(object):
elif isinstance(value, float):
value = b(repr(value))
elif not isinstance(value, basestring):
- value = str(value)
+ value = unicode(value)
if isinstance(value, unicode):
value = value.encode(self.encoding, self.encoding_errors)
return value