mirror of
https://github.com/python-pillow/Pillow.git
synced 2026-02-03 22:15:52 +03:00
Assert fp is not None
This commit is contained in:
parent
d7ec9b3473
commit
6d15142a1f
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user