Skip to content
Browse files

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

The built-in file type has been removed at Python 3.0.
  • Loading branch information...
1 parent 21a2010 commit dca6cfd4f53701467d0d0a6ff9c1f94bbb5732db @kazutoshi committed Sep 28, 2012
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:

0 comments on commit dca6cfd

Please sign in to comment.
Something went wrong with that request. Please try again.