Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix dump() in TemplateStream class for Python 3.x. #152

Closed
wants to merge 1 commit into from

2 participants

@kazutoshi

The built-in file type has been removed at Python 3.0.

@kazutoshi kazutoshi Fix dump() in TemplateStream class for Python 3.x.
The built-in file type has been removed at Python 3.0.
dca6cfd
@mitsuhiko mitsuhiko closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 28, 2012
  1. @kazutoshi

    Fix dump() in TemplateStream class for Python 3.x.

    kazutoshi authored
    The built-in file type has been removed at Python 3.0.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  jinja2/environment.py
View
2  jinja2/environment.py
@@ -1065,7 +1065,7 @@ def dump(self, fp, encoding=None, errors='strict'):
"""
close = False
if isinstance(fp, basestring):
- fp = file(fp, 'w')
+ fp = open(fp, 'wb')
close = True
try:
if encoding is not None:
Something went wrong with that request. Please try again.