Commits

Jimmy Mabey committed f8108da

Use compat.u() instead of u"" in RedisBackend

This fixes RedisBackend for Python 3.0 to 3.2, which don't support the
u"" syntax.

Comments (0)

Files changed (1)

dogpile/cache/backends/redis.py

 
 from __future__ import absolute_import
 from dogpile.cache.api import CacheBackend, NO_VALUE
-from dogpile.cache.compat import pickle
+from dogpile.cache.compat import pickle, u
 
 redis = None
 
 
     def get_mutex(self, key):
         if self.distributed_lock:
-            return self.client.lock(u"_lock{}".format(key), self.lock_timeout,
+            return self.client.lock(u('_lock{}').format(key), self.lock_timeout,
                                     self.lock_sleep)
         else:
             return None