Skip to content

Commit a804275

Browse files
committed
Added error handling if architecture file is not xml
1 parent dc4bfec commit a804275

File tree

1 file changed

+4
-0
lines changed
  • vtr_flow/scripts/python_libs/vtr

1 file changed

+4
-0
lines changed

vtr_flow/scripts/python_libs/vtr/flow.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ def run(
130130
# Verify that files are Paths or convert them to Paths and check that they exist
131131
architecture_file = vtr.util.verify_file(architecture_file, "Architecture")
132132
circuit_file = vtr.util.verify_file(circuit_file, "Circuit")
133+
if architecture_file.suffix != ".xml":
134+
raise vtr.VtrError(
135+
"Expected Architecture file as second argument (was {})".format(architecture_file.name)
136+
)
133137
power_tech_file = (
134138
vtr.util.verify_file(power_tech_file, "Power") if power_tech_file else None
135139
)

0 commit comments

Comments
 (0)