##// END OF EJS Templates
template engine: convert generator-based iterator to list-based iterator...
Weiwen -
r17982:e06e9fd2 default
parent child Browse files
Show More
@@ -8,6 +8,7 b''
8 8 from i18n import _
9 9 import sys, os, re
10 10 import util, config, templatefilters, parser, error
11 import types
11 12
12 13 # template parsing
13 14
@@ -140,6 +141,10 b' def runsymbol(context, mapping, key):'
140 141 v = context._defaults.get(key, '')
141 142 if util.safehasattr(v, '__call__'):
142 143 return v(**mapping)
144 if isinstance(v, types.GeneratorType):
145 v = list(v)
146 mapping[key] = v
147 return v
143 148 return v
144 149
145 150 def buildfilter(exp, context):
General Comments 0
You need to be logged in to leave comments. Login now