Refactor to reuse _accept

This commit is contained in:
hugovk 2017-03-04 20:03:34 +02:00
parent a0f50d7305
commit 5cf56e796f

View File

@ -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