We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d3cad8 commit 1dd22beCopy full SHA for 1dd22be
tools/unicode_properties_parse/download_unicode_data_files.py
@@ -3,6 +3,7 @@
3
4
from pathlib import PurePosixPath
5
import sys
6
+from urllib.error import HTTPError
7
from urllib.request import urlretrieve
8
9
@@ -36,7 +37,10 @@ def download_unicode_data_files():
36
37
url = base_url + data_file
38
filename = PurePosixPath(data_file).name
39
print(f"Downloading: {url}")
- urlretrieve(url, filename)
40
+ try:
41
+ urlretrieve(url, filename)
42
+ except HTTPError as http_error:
43
+ sys.exit(f"{http_error}")
44
45
46
if __name__ == "__main__":
0 commit comments