Skip to content
Myr

Make dump() work Python 3.3

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 e6c0630 · Browse files · 1 file+1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:jinja2/environment.py+1 added-1 removed
1067 unmodified lines
1068 Template('Hello {{ name }}!').stream(name='foo').dump('hello.html')1069 """1070 close = False1071 if isinstance(fp, six.string_types):1072 fp = open(fp, 'w')1072 fp = open(fp, encoding is None and 'w' or 'wb')1073 close = True1074 try:1075 if encoding is not None:1076 iterable = (x.encode(encoding, errors) for x in self)
53 unmodified lines