Ticket #292 - [276:eed140e3c4ed] mistakenly switched the logic of when to cache and...
authorLakin Wecker <lakin@structuredabstraction.com>
Thu, 10 Jan 2008 18:54:44 +0000 (11:54 -0700)
committerLakin Wecker <lakin@structuredabstraction.com>
Thu, 10 Jan 2008 18:54:44 +0000 (11:54 -0700)
--HG--
branch : trunk

jinja/loaders.py

index 4b4937ac23c10e061f9421a8c2c57ddf2bb71bda..03a89056a1a614f79d714c47e12ed11291a3f45e 100644 (file)
@@ -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