From a96ac321d530288d0da408b8df40396288b560ac Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Wed, 20 Dec 2017 11:45:52 +0000 Subject: [PATCH] merge error --- Tests/test_file_png.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py index 5a044eb82..ce2b3e608 100644 --- a/Tests/test_file_png.py +++ b/Tests/test_file_png.py @@ -53,14 +53,15 @@ class TestFilePng(PillowTestCase): chunks = [] with open(filename, "rb") as fp: fp.read(8) - while PngImagePlugin.PngStream(fp) as png: - cid, pos, length = png.read() - chunks.append(cid) - try: - s = png.call(cid, pos, length) - except EOFError: - break - png.crc(cid, s) + with PngImagePlugin.PngStream(fp) as png: + while True: + cid, pos, length = png.read() + chunks.append(cid) + try: + s = png.call(cid, pos, length) + except EOFError: + break + png.crc(cid, s) return chunks def test_sanity(self):