From 50be19d67329e7379e159beedb048cda568d377f Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Mon, 18 Dec 2023 17:22:31 -0800 Subject: [PATCH] cleanup --- selfdrive/debug/format_fingerprints.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/selfdrive/debug/format_fingerprints.py b/selfdrive/debug/format_fingerprints.py index a57afdd48f..3123194eff 100644 --- a/selfdrive/debug/format_fingerprints.py +++ b/selfdrive/debug/format_fingerprints.py @@ -55,6 +55,7 @@ FW_VERSIONS = { {% endif %} """ + def format_brand_fw_versions(brand): with open(f"selfdrive/car/{brand}/fingerprints.py", "w") as f: template = jinja2.Template(FINGERPRINTS_PY_TEMPLATE, trim_blocks=True) @@ -62,5 +63,7 @@ def format_brand_fw_versions(brand): f.write(template.render(brand=brand, ECU_NUMBER_TO_NAME=ECU_NUMBER_TO_NAME, PLATFORM_TO_PYTHON_CAR_NAME=PLATFORM_TO_PYTHON_CAR_NAME, FINGERPRINTS=FINGERPRINTS, FW_VERSIONS=FW_VERSIONS)) -for brand in FW_VERSIONS.keys(): - format_brand_fw_versions(brand) + +if __name__ == "__main__": + for brand in FW_VERSIONS.keys(): + format_brand_fw_versions(brand)