Skip to content
Myr

Fixed a check that broke pypy

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 788fd1c · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:jinja2/compiler.py+5 added-1 removed
51 unmodified lines
52 x = 4253 def f():54 if 0: dummy(x)55 return f56unoptimize_before_dead_code = bool(unoptimize_before_dead_code().__closure__)5657# The getattr is necessary for pypy which does not set this attribute if58# no closure is on the function59unoptimize_before_dead_code = bool(60 getattr(unoptimize_before_dead_code(), '__closure__', None))616263def generate(node, environment, name, filename, stream=None,64 defer_init=False):65 """Generate the python source for a node tree."""66 if not isinstance(node, nodes.Template):
1592 unmodified lines