One more possible exception

This commit is contained in:
Faik Uygur
2009-04-28 08:46:41 +00:00
parent 762fb0d5d9
commit f597b9c5dd
+1 -1
View File
@@ -54,7 +54,7 @@ class LazyDB(Singleton):
try: try:
self._instance().__dict__ = cPickle.load(file(self.__cache_file(), 'rb')) self._instance().__dict__ = cPickle.load(file(self.__cache_file(), 'rb'))
return True return True
except cPickle.UnpicklingError: except (cPickle.UnpicklingError, EOFError):
if os.access("/var/cache/pisi", os.W_OK): if os.access("/var/cache/pisi", os.W_OK):
os.unlink(self.__cache_file()) os.unlink(self.__cache_file())
return False return False