diff --git a/.github/locales.py b/.github/locales.py index 9ab272b9..7d6d6b90 100644 --- a/.github/locales.py +++ b/.github/locales.py @@ -56,8 +56,8 @@ for file in glob.glob(f"{XML_NAME}*/strings.xml"): if child.text.startswith("\\@string/"): print(f"[{file}] fixing {child.attrib['name']}") child.text = child.text.replace("\\@string/", "@string/") - with open(file, 'w') as fp: - fp.write('\n') + with open(file, 'wb') as fp: + fp.write(b'\n') tree.write(fp, encoding="utf-8", method="xml", pretty_print=True, xml_declaration=False) except ET.ParseError as ex: print(f"[{file}] {ex}")