From a5a41e38d0a63a9da87b0f8515116b7ca595a085 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 30 Jan 2024 05:07:00 -0600 Subject: [PATCH] format fingerprints: fix empty FW versions (#31230) fix old-commit-hash: c2ee07290721ef0317ef49021f95e71016222bc1 --- selfdrive/car/gm/fingerprints.py | 3 ++- selfdrive/debug/format_fingerprints.py | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/car/gm/fingerprints.py b/selfdrive/car/gm/fingerprints.py index 445d9571d4..c349ee2856 100644 --- a/selfdrive/car/gm/fingerprints.py +++ b/selfdrive/car/gm/fingerprints.py @@ -55,4 +55,5 @@ FINGERPRINTS = { }], } -FW_VERSIONS: dict[str, dict[tuple, list[bytes]]] = {} +FW_VERSIONS: dict[str, dict[tuple, list[bytes]]] = { +} diff --git a/selfdrive/debug/format_fingerprints.py b/selfdrive/debug/format_fingerprints.py index 1752aa1f06..bd5822729a 100755 --- a/selfdrive/debug/format_fingerprints.py +++ b/selfdrive/debug/format_fingerprints.py @@ -44,9 +44,8 @@ FINGERPRINTS = { {% endfor %} } {% endif %} -{% if FW_VERSIONS[brand] %} -FW_VERSIONS = { +FW_VERSIONS{% if not FW_VERSIONS[brand] %}: dict[str, dict[tuple, list[bytes]]]{% endif %} = { {% for car, _ in FW_VERSIONS[brand].items() %} CAR.{{car.name}}: { {% for key, fw_versions in FW_VERSIONS[brand][car].items() %} @@ -60,7 +59,7 @@ FW_VERSIONS = { }, {% endfor %} } -{% endif %} + """, trim_blocks=True)