Image cache now ignores corrupted image files
This commit is contained in:
1 parent
8d2ede89ca
commit
a26b359687
1 file changed
+1
-1
@@ -103,7 +103,7 @@ class ImageCache:
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
self._images[img_hash] = image = Image_module.open(CACHE_PATH / img_hash)
|
self._images[img_hash] = image = Image_module.open(CACHE_PATH / img_hash)
|
||||||
except FileNotFoundError:
|
except (FileNotFoundError, Image_module.UnidentifiedImageError):
|
||||||
pass
|
pass
|
||||||
if image is None:
|
if image is None:
|
||||||
async with self._twitch.request("GET", url) as response:
|
async with self._twitch.request("GET", url) as response:
|
||||||
|
|||||||
Reference in new issue
Block a user