Ticket #292 - Allow the results of subclasses of the PythonTranslator to be cached...
authorLakin Wecker <lakin@structuredabstraction.com>
Thu, 10 Jan 2008 18:10:03 +0000 (11:10 -0700)
committerLakin Wecker <lakin@structuredabstraction.com>
Thu, 10 Jan 2008 18:10:03 +0000 (11:10 -0700)
--HG--
branch : trunk

jinja/loaders.py

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