Skip to content

Commit 13bc864

Browse files
committed
Fix: Handle failed downloads of UCD specs
1 parent 09ca314 commit 13bc864

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/test_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def get_unicode_xml_data(version: str = UNICODE_VERSION) -> ET.Element:
5151
f.write(xml_content)
5252
print(f"Cached to {cache_path}")
5353
except Exception as e:
54-
raise RuntimeError(f"Could not download UCD XML from {url}: {e}")
54+
raise UnicodeDataDownloadError(f"Could not download UCD XML from {url}: {e}")
5555
else:
5656
print(f"Using cached Unicode {version} UCD XML: {cache_path}")
5757

@@ -195,7 +195,7 @@ def get_normalization_props(version: str = UNICODE_VERSION) -> Dict[int, Dict[st
195195
urllib.request.urlretrieve(url, cache_path)
196196
print(f"Cached to {cache_path}")
197197
except Exception as e:
198-
raise RuntimeError(
198+
raise UnicodeDataDownloadError(
199199
f"Could not download DerivedNormalizationProps.txt from {url}: {e}"
200200
)
201201
else:

0 commit comments

Comments
 (0)