From: Lakin Wecker Date: Thu, 10 Jan 2008 18:54:44 +0000 (-0700) Subject: Ticket #292 - [276:eed140e3c4ed] mistakenly switched the logic of when to cache and... X-Git-Tag: 2.0rc1~218^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=025b4b9ffdc9a59b81984999e4243133491a3cbb;p=jinja2.git Ticket #292 - [276:eed140e3c4ed] mistakenly switched the logic of when to cache and not cache, this patch fixes it and uses the more appropriate issubclass --HG-- branch : trunk --- diff --git a/jinja/loaders.py b/jinja/loaders.py index 4b4937a..03a8905 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 isinstance(translator, PythonTranslator): + if not issubclass(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 isinstance(translator, PythonTranslator): + if not issubclass(translator, PythonTranslator): return super(MemcachedLoaderMixin, self).load( environment, name, translator) tmpl = None