Skip to content

Commit b08f444

Browse files
committed
Fixing pretty-print by removing blank spaces in XMLs
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent 574ff90 commit b08f444

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vtr_flow/scripts/upgrade_arch.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def main():
6161
args = parse_args()
6262

6363
print args.xml_file
64-
parser = ET.XMLParser()
64+
parser = ET.XMLParser(remove_blank_text=True)
6565
root = ET.parse(args.xml_file, parser)
6666

6767
root_tags = root.findall(".")
@@ -934,7 +934,10 @@ def swap_tags(tile, pb_type):
934934
if arch.findall('./tiles'):
935935
return False
936936

937-
tiles = ET.SubElement(arch, 'tiles')
937+
models = arch.find('./models')
938+
939+
tiles = ET.Element('tiles')
940+
models.addnext(tiles)
938941

939942
top_pb_types = []
940943
for pb_type in arch.iter('pb_type'):

0 commit comments

Comments
 (0)