]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
explicitly catch marshal errors rather than genertic exception #281 282/head
authorTim Hanus <tim.hanus@adrevolution.com>
Fri, 22 Nov 2013 16:18:25 +0000 (10:18 -0600)
committerTim Hanus <tim.hanus@adrevolution.com>
Fri, 22 Nov 2013 16:18:25 +0000 (10:18 -0600)
jinja2/bccache.py

index 8ecbd4db29c5be9e630420908943f1e0793316cf..2146c35ce5af3328ec2b30d09030e19b96388315 100644 (file)
@@ -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