Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added filesize part to the module compiler. This fixes #131 for 3.3 a…

…nd later
  • Loading branch information...
commit 9e9cf47c81dc3ecae451b4224168ca6bab2cf701 1 parent 6327f79
@mitsuhiko authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 jinja2/environment.py
View
4 jinja2/environment.py
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.