From 94c07f68fb044d57fb5e59f2aea2b9b727b9b879 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sat, 4 Mar 2017 23:28:08 +0200 Subject: [PATCH] Python 3 fix --- PIL/XVThumbImagePlugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PIL/XVThumbImagePlugin.py b/PIL/XVThumbImagePlugin.py index 7686b263d..a7d39ed89 100644 --- a/PIL/XVThumbImagePlugin.py +++ b/PIL/XVThumbImagePlugin.py @@ -18,7 +18,7 @@ # from . import Image, ImageFile, ImagePalette -from ._binary import o8 +from ._binary import i8, o8 __version__ = "0.1" @@ -58,7 +58,7 @@ class XVThumbImageFile(ImageFile.ImageFile): s = self.fp.readline() if not s: raise SyntaxError("Unexpected EOF reading XV thumbnail file") - if s[0] != b'#': + if i8(s[0]) != 35: # ie. when not a comment: '#' break # parse header line (already read)