Skip to content
Myr

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

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

authored by Tim Hanus · committed by Tim Hanus · parent 63227f0 · 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
83 unmodified lines
84 checksum = pickle.load(f)85 if self.checksum != checksum:86 self.reset()87 return88 # if marshal_load fails then we need to reload89 try:88 self.code = marshal_load(f)90 self.code = marshal_load(f)91 except:92 self.reset()93 return9495 def write_bytecode(self, f):96 """Dump the bytecode into the file or file like object passed."""97 if self.code is None:
219 unmodified lines