##// 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 from i18n import _
8 from i18n import _
9 import sys, os, re
9 import sys, os, re
10 import util, config, templatefilters, parser, error
10 import util, config, templatefilters, parser, error
11 import types
11
12
12 # template parsing
13 # template parsing
13
14
@@ -140,6 +141,10 b' def runsymbol(context, mapping, key):'
140 v = context._defaults.get(key, '')
141 v = context._defaults.get(key, '')
141 if util.safehasattr(v, '__call__'):
142 if util.safehasattr(v, '__call__'):
142 return v(**mapping)
143 return v(**mapping)
144 if isinstance(v, types.GeneratorType):
145 v = list(v)
146 mapping[key] = v
147 return v
143 return v
148 return v
144
149
145 def buildfilter(exp, context):
150 def buildfilter(exp, context):
General Comments 0
You need to be logged in to leave comments. Login now