Revert "roomservice: Use ElementTree.write()"

Revert submission 402436

Reason for revert: Breaks build

Reverted changes: /q/submissionid:402436

Change-Id: Iac5d3be6cb7692d93dc68c7124dd4362e0800321
This commit is contained in:
Chirayu Desai
2024-09-13 00:44:07 +00:00
committed by Gerrit Code Review
parent 13e7f92f72
commit 76b04d2f8b

View File

@@ -192,8 +192,12 @@ def add_to_manifest(repositories):
lm.append(project)
ElementTree.indent(lm)
tree = ElementTree.ElementTree(lm)
tree.write('.repo/local_manifests/roomservice.xml', encoding='UTF-8', xml_declaration=True)
raw_xml = ElementTree.tostring(lm).decode()
raw_xml = '<?xml version="1.0" encoding="UTF-8"?>\n' + raw_xml
f = open('.repo/local_manifests/roomservice.xml', 'w')
f.write(raw_xml)
f.close()
def fetch_dependencies(repo_path):
print('Looking for dependencies in %s' % repo_path)