Update prepare_build for Python 3.12 (#3865)

This commit is contained in:
Abe Jellinek 2024-03-20 23:51:25 -04:00 committed by GitHub
parent 4f5c1c90af
commit 51d77d5699
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,7 +118,7 @@ def main():
with open(os.path.join(translators_dir, fn), 'r', encoding='utf-8') as f:
contents = f.read()
# Parse out the JSON metadata block
m = re.match('^\s*{[\S\s]*?}\s*?[\r\n]', contents)
m = re.match(r'^\s*{[\S\s]*?}\s*?[\r\n]', contents)
if not m:
raise Exception("Metadata block not found in " + f.name)
metadata = json.loads(m.group(0))