From: Armin Ronacher Date: Thu, 18 Oct 2007 21:15:40 +0000 (+0200) Subject: fixed but in requirement extraction that came up because the template node doesn... X-Git-Tag: 2.0rc1~261 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0167c1f02e360866b730cfb56eea4a03f2df77a4;p=jinja2.git fixed but in requirement extraction that came up because the template node doesn't have direct children any more. --HG-- branch : trunk --- diff --git a/jinja/translators/python.py b/jinja/translators/python.py index f760743..04b9aed 100644 --- a/jinja/translators/python.py +++ b/jinja/translators/python.py @@ -322,7 +322,7 @@ class PythonTranslator(Translator): # the master layout template is loaded. This can be used # for further processing. The output of those nodes does # not appear in the final template. - requirements += [child for child in node.get_child_nodes() + requirements += [child for child in node.body.get_child_nodes() if child.__class__ not in (nodes.Text, nodes.Block)]