mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-13 09:33:21 +03:00
Assert fp is not None
This commit is contained in:
parent
beab3fae1e
commit
cb3a4b4b57
|
@ -78,6 +78,8 @@ class AvifImageFile(ImageFile.ImageFile):
|
||||||
):
|
):
|
||||||
msg = "Invalid opening codec"
|
msg = "Invalid opening codec"
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
||||||
|
assert self.fp is not None
|
||||||
self._decoder = _avif.AvifDecoder(
|
self._decoder = _avif.AvifDecoder(
|
||||||
self.fp.read(),
|
self.fp.read(),
|
||||||
DECODE_CODEC_CHOICE,
|
DECODE_CODEC_CHOICE,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user