From: Armin Ronacher Date: Tue, 24 Jul 2007 07:15:00 +0000 (+0200) Subject: [svn] applied patch from #272, cmemcached is now used if available X-Git-Tag: 2.0rc1~278 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=630dfb7d8ee9c48332747c374b35acf303ef45e0;p=jinja2.git [svn] applied patch from #272, cmemcached is now used if available --HG-- branch : trunk --- diff --git a/jinja/loaders.py b/jinja/loaders.py index aadaad7..95d9d8d 100644 --- a/jinja/loaders.py +++ b/jinja/loaders.py @@ -273,7 +273,10 @@ class MemcachedLoaderMixin(object): def __init__(self, use_memcache, memcache_time=60 * 60 * 24 * 7, memcache_host=None, item_prefix='template/'): try: - from memcache import Client + try: + from cmemcache import Client + except ImportError: + from memcache import Client except ImportError: raise RuntimeError('the %r loader requires an installed ' 'memcache module' % self.__class__.__name__)