[script] complete code; start debugging on arch file converter

This commit is contained in:
tangxifan 2022-08-22 12:29:49 -07:00
parent 5134ea2233
commit 880d7122bf
1 changed files with 7 additions and 2 deletions

View File

@ -68,8 +68,13 @@ def convert_arch_xml_from_v1p1_to_v1p2(input_fname, output_fname):
# Add the node to the child node
sub_tile_node.append(child)
# Delete the out-of-date attributes
tile_node.pop(CAPACITY_TAG)
tile_node.SubElement(
tile_node.set(CAPACITY_TAG, None)
for child in tile_node:
if (child.tag != SUB_TILE_NODE_TAG):
tile_node.remove(child)
# Output the modified content
etree.dump(output_fname)
logging.info("[Done]")