From b4a9c67bbe5921c9a86adda25dece788d21807fc Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 7 Feb 2025 16:06:02 -0600 Subject: [PATCH] qcomgps: fix NameError on teardown (#34545) continue teardown if diag not there --- system/qcomgpsd/qcomgpsd.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/qcomgpsd/qcomgpsd.py b/system/qcomgpsd/qcomgpsd.py index dc7854671d..3a9e3585ba 100755 --- a/system/qcomgpsd/qcomgpsd.py +++ b/system/qcomgpsd/qcomgpsd.py @@ -240,8 +240,11 @@ def main() -> NoReturn: cloudlog.warning("caught sig disabling quectel gps") gpio_set(GPIO.GNSS_PWR_EN, False) - teardown_quectel(diag) - cloudlog.warning("quectel cleanup done") + try: + teardown_quectel(diag) + cloudlog.warning("quectel cleanup done") + except NameError: + cloudlog.warning('quectel not yet setup') stop_download_event.set() assist_fetch_proc.kill()