Skip to content
Myr

Merge pull request #282 from timhanus/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

force a reload of the template if bytecode fails to unmarshall. issue #...

authored by Armin Ronacher · committed by Armin Ronacher · parents f5a8003, 23551a5 · Browse files · 1 file+6 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−1 removed

  • other:+6 added−1 removed

1 file+6 added−1 removed

modified:jinja2/bccache.py+6 added-1 removed
86 unmodified lines
87 checksum = pickle.load(f)88 if self.checksum != checksum:89 self.reset()90 return91 # if marshal_load fails then we need to reload92 try:91 self.code = marshal_load(f)93 self.code = marshal_load(f)94 except (EOFError, ValueError, TypeError):95 self.reset()96 return9798 def write_bytecode(self, f):99 """Dump the bytecode into the file or file like object passed."""100 if self.code is None:
262 unmodified lines