Show More
@@ -282,7 +282,7 b' class templater(object):' | |||||
282 | self.filters.update(filters) |
|
282 | self.filters.update(filters) | |
283 | self.defaults = defaults |
|
283 | self.defaults = defaults | |
284 | self.minchunk, self.maxchunk = minchunk, maxchunk |
|
284 | self.minchunk, self.maxchunk = minchunk, maxchunk | |
285 |
self.e |
|
285 | self.ecache = {} | |
286 |
|
286 | |||
287 | if not mapfile: |
|
287 | if not mapfile: | |
288 | return |
|
288 | return | |
@@ -322,10 +322,10 b' class templater(object):' | |||||
322 |
|
322 | |||
323 | def __call__(self, t, **mapping): |
|
323 | def __call__(self, t, **mapping): | |
324 | ttype = t in self.map and self.map[t][0] or 'default' |
|
324 | ttype = t in self.map and self.map[t][0] or 'default' | |
325 | proc = self.engines.get(ttype) |
|
325 | if ttype not in self.ecache: | |
326 | if proc is None: |
|
326 | self.ecache[ttype] = engines[ttype](self.load, | |
327 | proc = engines[ttype](self.load, self.filters, self.defaults) |
|
327 | self.filters, self.defaults) | |
328 |
|
|
328 | proc = self.ecache[ttype] | |
329 |
|
329 | |||
330 | stream = proc.process(t, mapping) |
|
330 | stream = proc.process(t, mapping) | |
331 | if self.minchunk: |
|
331 | if self.minchunk: |
General Comments 0
You need to be logged in to leave comments.
Login now