Skip to content

Commit

Permalink
Added filesize part to the module compiler. This fixes pallets#131 fo…
Browse files Browse the repository at this point in the history
…r 3.3 and later
  • Loading branch information
mitsuhiko committed Sep 15, 2012
1 parent 6327f79 commit 9e9cf47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jinja2/environment.py
Expand Up @@ -570,6 +570,10 @@ def compile_templates(self, target, extensions=None, filter_func=None,
py_header = imp.get_magic() + \
u'\xff\xff\xff\xff'.encode('iso-8859-15')

# Python 3.3 added a source filesize to the header
if sys.version_info >= (3, 3):
py_header += '\x00\x00\x00\x00'

def write_file(filename, data, mode):
if zip:
info = ZipInfo(filename)
Expand Down

0 comments on commit 9e9cf47

Please sign in to comment.