mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Refactor to reuse _accept
This commit is contained in:
parent
a0f50d7305
commit
5cf56e796f
|
@ -47,7 +47,7 @@ class XVThumbImageFile(ImageFile.ImageFile):
|
|||
def _open(self):
|
||||
|
||||
# check magic
|
||||
if self.fp.read(6) != _MAGIC:
|
||||
if not _accept(self.fp.read(6)):
|
||||
raise SyntaxError("not an XV thumbnail file")
|
||||
|
||||
# Skip to beginning of next line
|
||||
|
|
Loading…
Reference in New Issue
Block a user