Fixed an unicode error after 2to3
authorArmin Ronacher <armin.ronacher@active-4.com>
Sat, 15 Sep 2012 23:30:50 +0000 (08:30 +0900)
committerArmin Ronacher <armin.ronacher@active-4.com>
Sat, 15 Sep 2012 23:30:50 +0000 (08:30 +0900)
jinja2/environment.py

index 130f9a16a4b53035be75bf69cb5ca8a258080d70..1b5dc40dccfe7f3bc63d8424de6bc72902c1e141 100644 (file)
@@ -572,7 +572,7 @@ class Environment(object):
 
             # Python 3.3 added a source filesize to the header
             if sys.version_info >= (3, 3):
-                py_header += '\x00\x00\x00\x00'
+                py_header += u'\x00\x00\x00\x00'.encode('iso-8859-15')
 
         def write_file(filename, data, mode):
             if zip: