mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +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):
|
def _open(self):
|
||||||
|
|
||||||
# check magic
|
# check magic
|
||||||
if self.fp.read(6) != _MAGIC:
|
if not _accept(self.fp.read(6)):
|
||||||
raise SyntaxError("not an XV thumbnail file")
|
raise SyntaxError("not an XV thumbnail file")
|
||||||
|
|
||||||
# Skip to beginning of next line
|
# Skip to beginning of next line
|
||||||
|
|
Loading…
Reference in New Issue
Block a user