From d4604bb62b2e9d5fd2dacf0958992755fa822037 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Wed, 3 Jan 2018 10:41:36 +0000 Subject: [PATCH] Remove case for when _imaging module is not present --- src/PIL/PngImagePlugin.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py index 2031b179e..51e5ad768 100644 --- a/src/PIL/PngImagePlugin.py +++ b/src/PIL/PngImagePlugin.py @@ -92,13 +92,9 @@ def _safe_zlib_decompress(s): class ChunkStream(object): def __init__(self, fp): - self.fp = fp self.queue = [] - if not hasattr(Image.core, "crc32"): - self.crc = self.crc_skip - def read(self): "Fetch a new chunk. Returns header information." cid = None @@ -160,7 +156,7 @@ class ChunkStream(object): "Read checksum. Used if the C module is not present" self.fp.read(4) - + def verify(self, endchunk=b"IEND"): # Simple approach; just calculate checksum for all remaining