From ab2eab0ffb68079a61c29ed15b3732dd715e03b8 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 27 Sep 2022 20:17:42 -0700 Subject: [PATCH] Log more FW/VIN errors in qlogs (#25901) * log VIN query errors * Update fw_versions.py * use exception * post-commit old-commit-hash: ba1c3cda41de2002a31591fe0b92eca63df683b5 --- selfdrive/car/fw_versions.py | 3 +-- selfdrive/car/vin.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/selfdrive/car/fw_versions.py b/selfdrive/car/fw_versions.py index 9c0c406f14..bf88e77db5 100755 --- a/selfdrive/car/fw_versions.py +++ b/selfdrive/car/fw_versions.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -import traceback from collections import defaultdict from typing import Any, Optional, Set, Tuple from tqdm import tqdm @@ -270,7 +269,7 @@ def get_fw_versions(logcan, sendcan, query_brand=None, extra=None, timeout=0.1, car_fw.append(f) except Exception: - cloudlog.warning(f"FW query exception: {traceback.format_exc()}") + cloudlog.exception("FW query exception") return car_fw diff --git a/selfdrive/car/vin.py b/selfdrive/car/vin.py index fba0c54eba..909322f9c9 100755 --- a/selfdrive/car/vin.py +++ b/selfdrive/car/vin.py @@ -1,6 +1,5 @@ #!/usr/bin/env python3 import re -import traceback import cereal.messaging as messaging from selfdrive.car.isotp_parallel_query import IsoTpParallelQuery @@ -28,9 +27,9 @@ def get_vin(logcan, sendcan, bus, timeout=0.1, retry=5, debug=False): vin = vin[1:18] return addr[0], rx_addr, vin.decode() - print(f"vin query retry ({i+1}) ...") + cloudlog.error(f"vin query retry ({i+1}) ...") except Exception: - cloudlog.warning(f"VIN query exception: {traceback.format_exc()}") + cloudlog.exception("VIN query exception") return 0, 0, VIN_UNKNOWN