Don’t raise error when cache item has been deleted from another thread

This commit is contained in:
Ivan Kravets
2017-05-01 01:33:51 +03:00
parent 884859324d
commit 56d4d545c1

View File

@ -155,9 +155,12 @@ class ContentCache(object):
continue
found = True
if isfile(path):
remove(path)
if not listdir(dirname(path)):
util.rmtree_(dirname(path))
try:
remove(path)
if not listdir(dirname(path)):
util.rmtree_(dirname(path))
except OSError:
pass
if found and self._lock_dbindex():
with open(self._db_path, "w") as fp: