mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
cache_shelve: wrap deletions in try..except in purge_outdated
Hopefully solves #402 and #439.
This commit is contained in:
parent
a6b1e6e9ab
commit
2f31dc7aab
@ -126,6 +126,11 @@ class ShelveCache:
|
|||||||
continue
|
continue
|
||||||
todelete.append(path)
|
todelete.append(path)
|
||||||
for path in todelete:
|
for path in todelete:
|
||||||
|
try:
|
||||||
del self[path]
|
del self[path]
|
||||||
|
except KeyError:
|
||||||
|
# I have no idea why a KeyError sometimes happen, but it does, as we can see in
|
||||||
|
# #402 and #439. I don't think it hurts to silently ignore the error, so that's
|
||||||
|
# what we do
|
||||||
|
pass
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user