mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 01:04:29 +03:00
commit
3e9457a034
|
@ -9,7 +9,11 @@ def fetch(url):
|
|||
|
||||
if not os.path.exists(name):
|
||||
print("Fetching", url)
|
||||
content = urllib.request.urlopen(url).read()
|
||||
try:
|
||||
r = urllib.request.urlopen(url)
|
||||
except urllib.error.URLError:
|
||||
r = urllib.request.urlopen(url)
|
||||
content = r.read()
|
||||
with open(name, 'wb') as fd:
|
||||
fd.write(content)
|
||||
return name
|
||||
|
|
Loading…
Reference in New Issue
Block a user