From 630dfb7d8ee9c48332747c374b35acf303ef45e0 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Tue, 24 Jul 2007 09:15:00 +0200 Subject: [PATCH] [svn] applied patch from #272, cmemcached is now used if available --HG-- branch : trunk --- jinja/loaders.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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__) -- 2.26.2