From cceba715d42bfe4f9c4b2b915c42c8814ab86ffb Mon Sep 17 00:00:00 2001 From: Lakin Wecker Date: Thu, 10 Jan 2008 11:10:03 -0700 Subject: [PATCH] Ticket #292 - Allow the results of subclasses of the PythonTranslator to be cached as well. --HG-- branch : trunk --- jinja/loaders.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jinja/loaders.py b/jinja/loaders.py index e3dccde..4b4937a 100644 --- a/jinja/loaders.py +++ b/jinja/loaders.py @@ -239,7 +239,7 @@ class CachedLoaderMixin(object): try: # caching is only possible for the python translator. skip # all other translators - if translator is not PythonTranslator: + if isinstance(translator, PythonTranslator): return super(CachedLoaderMixin, self).load( environment, name, translator) @@ -363,7 +363,7 @@ class MemcachedLoaderMixin(object): try: # caching is only possible for the python translator. skip # all other translators - if translator is not PythonTranslator: + if isinstance(translator, PythonTranslator): return super(MemcachedLoaderMixin, self).load( environment, name, translator) tmpl = None -- 2.26.2