From: Aarni Koskela Date: Tue, 31 Dec 2019 07:58:03 +0000 (+0200) Subject: CLDR import: assume files without revision tags to be new X-Git-Tag: v2.8.0~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fab99b8924ad37e9f04798f464f37e2359ebafeb;p=thirdparty%2Fbabel.git CLDR import: assume files without revision tags to be new --- diff --git a/scripts/import_cldr.py b/scripts/import_cldr.py index 4188055a..8993b68e 100755 --- a/scripts/import_cldr.py +++ b/scripts/import_cldr.py @@ -77,8 +77,10 @@ def error(message, *args): def need_conversion(dst_filename, data_dict, source_filename): with open(source_filename, 'rb') as f: blob = f.read(4096) - version = int(re.search(b'version number="\\$Revision: (\\d+)', - blob).group(1)) + version_match = re.search(b'version number="\\$Revision: (\\d+)', blob) + if not version_match: # CLDR 36.0 was shipped without proper revision numbers + return True + version = int(version_match.group(1)) data_dict['_version'] = version if not os.path.isfile(dst_filename):