From: Tim Hanus Date: Fri, 22 Nov 2013 16:18:25 +0000 (-0600) Subject: explicitly catch marshal errors rather than genertic exception #281 X-Git-Tag: 2.8~67^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23551a53cddd0fa2037f324980ef2f773046daf4;p=thirdparty%2Fjinja.git explicitly catch marshal errors rather than genertic exception #281 --- diff --git a/jinja2/bccache.py b/jinja2/bccache.py index 8ecbd4db..2146c35c 100644 --- a/jinja2/bccache.py +++ b/jinja2/bccache.py @@ -88,7 +88,7 @@ class Bucket(object): # if marshal_load fails then we need to reload try: self.code = marshal_load(f) - except: + except (EOFError, ValueError, TypeError): self.reset() return