Adding error checking to only use the cached fp if they're valid (#1182)

old-commit-hash: 5e9daf2471
This commit is contained in:
Andrew Chan
2020-03-02 09:04:49 -08:00
committed by GitHub
parent 1cae066cda
commit 5a125fc7d6
+1 -1
View File
@@ -76,7 +76,7 @@ def fingerprint(logcan, sendcan, has_relay):
if cached_params.carName == "mock":
cached_params = None
if cached_params is not None:
if cached_params is not None and len(cached_params.carFw) > 0 and cached_params.carVin is not VIN_UNKNOWN:
cloudlog.warning("Using cached CarParams")
vin = cached_params.carVin
car_fw = list(cached_params.carFw)