One more possible exception
This commit is contained in:
+1
-1
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user