mirror of
https://github.com/kiwix/kiwix-build.git
synced 2025-09-24 21:43:49 -04:00
except the correct exception URLError when downloading.
`urllib.request.open` can raise a URLError or a HTTPError.
This commit is contained in:
parent
24c771aaa8
commit
72d9e99bf9
@ -118,8 +118,8 @@ def download_remote(what, where, check_certificate=True):
|
||||
print_progress(progress_chars[current])
|
||||
current = (current+1)%4
|
||||
file.write(batch)
|
||||
except urllib.error.HTTPError:
|
||||
print("Cannot download url {}".format(file_url))
|
||||
except urllib.error.URLError as e:
|
||||
print("Cannot download url {}:\n{}".format(file_url, e.reason))
|
||||
raise StopBuild()
|
||||
|
||||
if not what.sha256:
|
||||
|
Loading…
x
Reference in New Issue
Block a user