Commit 32daa42e authored by Sean Bleier's avatar Sean Bleier

Fix Python3 issue.

parent 0ed6806c
...@@ -8,6 +8,11 @@ from redis_cache.compat import ( ...@@ -8,6 +8,11 @@ from redis_cache.compat import (
smart_text, python_2_unicode_compatible, bytes_type smart_text, python_2_unicode_compatible, bytes_type
) )
try:
basestring
except NameError:
basestring = str
@python_2_unicode_compatible @python_2_unicode_compatible
class CacheKey(object): class CacheKey(object):
...@@ -31,7 +36,7 @@ def get_servers(location): ...@@ -31,7 +36,7 @@ def get_servers(location):
"""Returns a list of servers given the server argument passed in from """Returns a list of servers given the server argument passed in from
Django. Django.
""" """
if isinstance(location, bytes_type): if isinstance(location, basestring):
servers = location.split(',') servers = location.split(',')
elif hasattr(location, '__iter__'): elif hasattr(location, '__iter__'):
servers = location servers = location
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment