]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Make sure filtering returns a list for template listing.
authorArmin Ronacher <armin.ronacher@active-4.com>
Fri, 6 Jun 2014 16:40:02 +0000 (22:40 +0600)
committerArmin Ronacher <armin.ronacher@active-4.com>
Fri, 6 Jun 2014 16:40:02 +0000 (22:40 +0600)
jinja2/environment.py

index d65059a08d6ced2114871cc39356aecc934c5058..7cdce6ffbde1c01d1dd4cbf58d5d7cc10cb7b07f 100644 (file)
@@ -717,7 +717,7 @@ class Environment(object):
             filter_func = lambda x: '.' in x and \
                                     x.rsplit('.', 1)[1] in extensions
         if filter_func is not None:
-            x = ifilter(filter_func, x)
+            x = list(ifilter(filter_func, x))
         return x
 
     def handle_exception(self, exc_info=None, rendered=False, source_hint=None):