From db1b74198bd8ecc70ecf99702c5b4a90c257f038 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Wed, 3 Jan 2018 10:56:17 +0000 Subject: [PATCH 1/2] Don't reassign crc on close --- src/PIL/PngImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py index 442c65e6f1b..5a991b6e84a 100644 --- a/src/PIL/PngImagePlugin.py +++ b/src/PIL/PngImagePlugin.py @@ -189,7 +189,7 @@ def __exit__(self, *args): self.close() def close(self): - self.queue = self.crc = self.fp = None + self.queue = self.fp = None def push(self, cid, pos, length): From b34307b9d29968a03824f4aa510f57a62d302f4f Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 30 Sep 2022 21:57:54 +1000 Subject: [PATCH 2/2] Corrected docstring --- src/PIL/PngImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py index 5a991b6e84a..abcffe92641 100644 --- a/src/PIL/PngImagePlugin.py +++ b/src/PIL/PngImagePlugin.py @@ -224,7 +224,7 @@ def crc(self, cid, data): ) from e def crc_skip(self, cid, data): - """Read checksum. Used if the C module is not present""" + """Read checksum""" self.fp.read(4)