From 0e0c0cb434a7655efed14f10dd9b33abde53e7ed Mon Sep 17 00:00:00 2001 From: DevilXD Date: Sat, 2 Jul 2022 12:17:39 +0200 Subject: [PATCH] Don't error if the cached file is already deleted --- cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.py b/cache.py index fb4a081..1e52130 100644 --- a/cache.py +++ b/cache.py @@ -59,7 +59,7 @@ class ImageCache: if count == 0: # hashes come with an extension already for file in CACHE_PATH.glob(img_hash): - file.unlink() + file.unlink(missing_ok=True) def save(self) -> None: if self._altered: