Catch ValueError exceptions.
authorJohan Dahlin <jdahlin@async.com.br>
Wed, 19 Nov 2008 20:15:14 +0000 (20:15 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Wed, 19 Nov 2008 20:15:14 +0000 (20:15 +0000)
2008-11-19  Johan Dahlin  <jdahlin@async.com.br>

        * giscanner/cachestore.py:
        Catch ValueError exceptions.

svn path=/trunk/; revision=950

ChangeLog
giscanner/cachestore.py

index 482d2ba..6b7f440 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-19  Johan Dahlin  <jdahlin@async.com.br>
+
+       * giscanner/cachestore.py:
+       Catch ValueError exceptions.
+
 2008-11-18  Tommi Komulainen  <tommi.komulainen@iki.fi>
 
        * tests/scanner/Makefile.am (barapp_SOURCES): fix builddir != srcdir
index 11c5d75..bd3d864 100644 (file)
@@ -106,7 +106,7 @@ class CacheStore(object):
             return None
         try:
             data = cPickle.load(fd)
-        except (EOFError, cPickle.BadPickleGet):
+        except (EOFError, ValueError, cPickle.BadPickleGet):
             # Broken cache entry, remove it
             self._purge_cache(store_filename)
             data = None