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