diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index 7fb756a3e01158..82ccbf2e299144 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -1,5 +1,6 @@ import os import threading +import requests from common.params import Params, put_nonblocking from common.basedir import BASEDIR from selfdrive.version import comma_remote, tested_branch @@ -183,15 +184,15 @@ def is_connected_to_internet(timeout=5): try: requests.get("https://sentry.io", timeout=timeout) return True - except: + except Exception: return False - + def crash_log(candidate): while True: if is_connected_to_internet(): crash.capture_warning("fingerprinted %s" % candidate) break - + def crash_log2(fingerprints, fw): while True: if is_connected_to_internet():