From 06114c5108222564e156c9b20aea8970c2b51b6e Mon Sep 17 00:00:00 2001 From: "Shane F. Carr" Date: Wed, 8 May 2019 10:28:29 -0700 Subject: [PATCH] ICU-20593 Consuming ignore_xml_deprecates option in BUILDRULES.py. The option was added in b603285, but the option was not being used. --- icu4c/source/data/BUILDRULES.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/icu4c/source/data/BUILDRULES.py b/icu4c/source/data/BUILDRULES.py index 30f82936a5c..686e0feebdc 100644 --- a/icu4c/source/data/BUILDRULES.py +++ b/icu4c/source/data/BUILDRULES.py @@ -518,15 +518,17 @@ def generate_tree( # Generate res_index file synthetic_locales = set() - deprecates_xml_path = os.path.join(os.path.dirname(__file__), xml_filename) - deprecates_xml = ET.parse(deprecates_xml_path) - for child in deprecates_xml.getroot(): - if child.tag == "alias": - synthetic_locales.add(child.attrib["from"]) - elif child.tag == "emptyLocale": - synthetic_locales.add(child.attrib["locale"]) - else: - raise ValueError("Unknown tag in deprecates XML: %s" % child.tag) + if not config.ignore_xml_deprecates: + deprecates_xml_path = os.path.join( + os.path.dirname(__file__), xml_filename) + deprecates_xml = ET.parse(deprecates_xml_path) + for child in deprecates_xml.getroot(): + if child.tag == "alias": + synthetic_locales.add(child.attrib["from"]) + elif child.tag == "emptyLocale": + synthetic_locales.add(child.attrib["locale"]) + else: + raise ValueError("Unknown tag in deprecates XML: %s" % child.tag) index_input_files = [] for f in input_files: file_stem = f.filename[f.filename.rfind("/")+1:-4]