mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-22 21:24:46 +03:00
Download CVE images instead of storing them on disk
This commit is contained in:
parent
74c8072945
commit
5795ec2f24
|
@ -14,16 +14,20 @@
|
||||||
# version.
|
# version.
|
||||||
|
|
||||||
|
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
repro_read_strip = (
|
repro_read_strip = (
|
||||||
"images/crash_1.tif",
|
"crash_1.tif",
|
||||||
"images/crash_2.tif",
|
"crash_2.tif",
|
||||||
)
|
)
|
||||||
|
|
||||||
for path in repro_read_strip:
|
for path in repro_read_strip:
|
||||||
with Image.open(path) as im:
|
repo = "https://raw.githubusercontent.com/python-pillow/Pillow/master/"
|
||||||
try:
|
with urllib.request.urlopen(repo + "Tests/images/" + path) as f:
|
||||||
im.load()
|
with Image.open(f) as im:
|
||||||
except Exception as msg:
|
try:
|
||||||
print(msg)
|
im.load()
|
||||||
|
except Exception as msg:
|
||||||
|
print(msg)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user