From bc75d890accd528d9f0d18e8d4becc09828629c3 Mon Sep 17 00:00:00 2001 From: Rick Lan Date: Wed, 22 Nov 2023 16:52:14 +0800 Subject: [PATCH] Use syntax for 3.8.10 --- selfdrive/car/car_helpers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index 5c1234258..e9d7cfcc7 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -132,9 +132,10 @@ def fingerprint(logcan, sendcan, num_pandas): cached_params = params.get("CarParamsCache") if cached_params is not None: - with car.CarParams.from_bytes(cached_params) as cached_params: - if cached_params.carName == "mock": - cached_params = None + # with car.CarParams.from_bytes(cached_params) as cached_params: + cached_params = car.CarParams.from_bytes(cached_params) + if cached_params.carName == "mock": + cached_params = None if cached_params is not None and len(cached_params.carFw) > 0 and \ cached_params.carVin is not VIN_UNKNOWN and not disable_fw_cache: