From 5089cc275e6077a070017587001c22e490995d47 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 2 Nov 2017 06:30:07 -0700 Subject: Use unicode literals throughout project Remove workaround for handling unicode with older Pythons. --- redis/exceptions.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'redis/exceptions.py') diff --git a/redis/exceptions.py b/redis/exceptions.py index a8518c7..44ab6f7 100644 --- a/redis/exceptions.py +++ b/redis/exceptions.py @@ -1,21 +1,10 @@ "Core exceptions raised by the Redis client" -from redis._compat import unicode class RedisError(Exception): pass -# python 2.5 doesn't implement Exception.__unicode__. Add it here to all -# our exception types -if not hasattr(RedisError, '__unicode__'): - def __unicode__(self): - if isinstance(self.args[0], unicode): - return self.args[0] - return unicode(self.args[0]) - RedisError.__unicode__ = __unicode__ - - class AuthenticationError(RedisError): pass -- cgit v1.2.1