diff options
Diffstat (limited to 'redis/client.py')
-rwxr-xr-x | redis/client.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/redis/client.py b/redis/client.py index e444571..70024af 100755 --- a/redis/client.py +++ b/redis/client.py @@ -6,7 +6,8 @@ import warnings import threading import time as mod_time from redis._compat import (b, basestring, bytes, imap, iteritems, iterkeys, - itervalues, izip, long, nativestr, unicode) + itervalues, izip, long, nativestr, unicode, + safe_unicode) from redis.connection import (ConnectionPool, UnixDomainSocketConnection, SSLConnection, Token) from redis.lock import Lock, LuaLock @@ -2532,9 +2533,9 @@ class BasePipeline(object): raise r def annotate_exception(self, exception, number, command): - cmd = unicode(' ').join(imap(unicode, command)) + cmd = safe_unicode(' ').join(imap(safe_unicode, command)) msg = unicode('Command # %d (%s) of pipeline caused error: %s') % ( - number, cmd, unicode(exception.args[0])) + number, cmd, safe_unicode(exception.args[0])) exception.args = (msg,) + exception.args[1:] def parse_response(self, connection, command_name, **options): |