Assert fp is not None

This commit is contained in:
Andrew Murray 2025-12-29 15:18:13 +11:00
parent d7ec9b3473
commit 6d15142a1f

View File

@ -184,6 +184,7 @@ class VtfImageFile(ImageFile.ImageFile):
format_description = "Valve Texture Format"
def _open(self):
assert self.fp is not None
if not _accept(self.fp.read(12)):
msg = "not a VTF file"
raise SyntaxError(msg)