From a26b3596877776e78f26888fac896fceb3b58c21 Mon Sep 17 00:00:00 2001 From: DevilXD <4180725+DevilXD@users.noreply.github.com> Date: Sun, 1 Jun 2025 08:27:50 +0200 Subject: [PATCH] Image cache now ignores corrupted image files --- cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.py b/cache.py index d4008f0..28b9b8d 100644 --- a/cache.py +++ b/cache.py @@ -103,7 +103,7 @@ class ImageCache: else: try: self._images[img_hash] = image = Image_module.open(CACHE_PATH / img_hash) - except FileNotFoundError: + except (FileNotFoundError, Image_module.UnidentifiedImageError): pass if image is None: async with self._twitch.request("GET", url) as response: