Assert fp is not None

This commit is contained in:
Andrew Murray 2025-04-03 18:18:49 +11:00
parent beab3fae1e
commit cb3a4b4b57

View File

@ -78,6 +78,8 @@ class AvifImageFile(ImageFile.ImageFile):
):
msg = "Invalid opening codec"
raise ValueError(msg)
assert self.fp is not None
self._decoder = _avif.AvifDecoder(
self.fp.read(),
DECODE_CODEC_CHOICE,