Show More
@@ -38,6 +38,10 class wrapped(object): | |||
|
38 | 38 | __metaclass__ = abc.ABCMeta |
|
39 | 39 | |
|
40 | 40 | @abc.abstractmethod |
|
41 | def itermaps(self): | |
|
42 | """Yield each template mapping""" | |
|
43 | ||
|
44 | @abc.abstractmethod | |
|
41 | 45 | def show(self, context, mapping): |
|
42 | 46 | """Return a bytes or (possibly nested) generator of bytes representing |
|
43 | 47 | the underlying object |
@@ -493,7 +497,7 def _formatfiltererror(arg, filt): | |||
|
493 | 497 | def runmap(context, mapping, data): |
|
494 | 498 | darg, targ = data |
|
495 | 499 | d = evalrawexp(context, mapping, darg) |
|
496 | if util.safehasattr(d, 'itermaps'): | |
|
500 | if isinstance(d, wrapped): | |
|
497 | 501 | diter = d.itermaps() |
|
498 | 502 | else: |
|
499 | 503 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now