Catch BadPickleGet exceptions as well.
authorJohan Dahlin <jdahlin@async.com.br>
Tue, 18 Nov 2008 11:02:24 +0000 (11:02 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Tue, 18 Nov 2008 11:02:24 +0000 (11:02 +0000)
2008-11-18  Johan Dahlin  <jdahlin@async.com.br>

        * giscanner/cachestore.py:
        Catch BadPickleGet exceptions as well.

svn path=/trunk/; revision=942

ChangeLog
giscanner/cachestore.py

index 383e564..7319e02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-18  Johan Dahlin  <jdahlin@async.com.br>
+
+       * giscanner/cachestore.py:
+       Catch BadPickleGet exceptions as well.  
+
 2008-11-17  Owen Taylor  <otaylor@redhat.com>
 
        * tests/everything/everything.c: Fix doc comment annotations
index 264ccee..11c5d75 100644 (file)
@@ -106,7 +106,7 @@ class CacheStore(object):
             return None
         try:
             data = cPickle.load(fd)
-        except EOFError:
+        except (EOFError, cPickle.BadPickleGet):
             # Broken cache entry, remove it
             self._purge_cache(store_filename)
             data = None