Commit 686cd3fc authored by Jannis Leidel's avatar Jannis Leidel Committed by Sean Bleier

Bail if not able to import redis-py.

parent f6793404
from django.core.cache.backends.base import BaseCache, InvalidCacheBackendError
from django.utils.encoding import smart_unicode, smart_str
from django.utils.datastructures import SortedDict
try: try:
import cPickle as pickle import cPickle as pickle
except ImportError: except ImportError:
import pickle import pickle
import redis try:
from django.core.cache.backends.base import BaseCache import redis
from django.utils.encoding import smart_unicode, smart_str except:
raise InvalidCacheBackendError(
"Redis cache backend requires the 'redis-py' library")
class CacheClass(BaseCache): class CacheClass(BaseCache):
......
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