mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Compare prefix to byte strings
This commit is contained in:
parent
b9b6972097
commit
64c25bcf89
|
@ -4,7 +4,7 @@ from io import BytesIO
|
|||
import _webp
|
||||
|
||||
def _accept(prefix):
|
||||
return prefix[:4] == "RIFF" and prefix[8:16] == "WEBPVP8 "
|
||||
return prefix[:4] == b"RIFF" and prefix[8:16] == b"WEBPVP8 "
|
||||
|
||||
class WebPImageFile(ImageFile.ImageFile):
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user