Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 12, 2024
1 parent f8472d1 commit b9c37d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PIL/PngImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,9 @@ def load_end(self):
try:
ImageFile._safe_read(self.fp, length)
except OSError as e:
if (str(e) == 'Truncated File Read') and ImageFile.LOAD_TRUNCATED_IMAGES:
if (

Check warning on line 987 in src/PIL/PngImagePlugin.py

View check run for this annotation

Codecov / codecov/patch

src/PIL/PngImagePlugin.py#L986-L987

Added lines #L986 - L987 were not covered by tests
str(e) == "Truncated File Read"
) and ImageFile.LOAD_TRUNCATED_IMAGES:
logger.debug("%r %s %s (Truncated File Read)", cid, pos, length)
break

Check warning on line 991 in src/PIL/PngImagePlugin.py

View check run for this annotation

Codecov / codecov/patch

src/PIL/PngImagePlugin.py#L990-L991

Added lines #L990 - L991 were not covered by tests
else:
Expand Down

0 comments on commit b9c37d2

Please sign in to comment.