From: Armin Ronacher Date: Fri, 6 Jun 2014 16:40:02 +0000 (+0600) Subject: Make sure filtering returns a list for template listing. X-Git-Tag: 2.8~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73f27f5b32c8264de7fb215d84c97a5271a00364;p=thirdparty%2Fjinja.git Make sure filtering returns a list for template listing. --- diff --git a/jinja2/environment.py b/jinja2/environment.py index d65059a0..7cdce6ff 100644 --- a/jinja2/environment.py +++ b/jinja2/environment.py @@ -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):