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)
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