Skip to content

Commit

Permalink
Merge pull request pallets#48 from ymirpl/master
Browse files Browse the repository at this point in the history
"NameError: global name 'code' is not defined" if using byte code cache on Python 2.7.1.
  • Loading branch information
mitsuhiko committed Jul 12, 2011
2 parents 4e699a9 + eeea495 commit 6e6afa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jinja2/bccache.py
Expand Up @@ -98,7 +98,7 @@ def write_bytecode(self, f):
raise TypeError('can\'t write empty bucket')
f.write(bc_magic)
pickle.dump(self.checksum, f, 2)
marshal_dump(code, f)
marshal_dump(self.code, f)

def bytecode_from_string(self, string):
"""Load bytecode from a string."""
Expand Down

0 comments on commit 6e6afa3

Please sign in to comment.