catch exception in uploader.py

pull/1000/head
Willem Melching 5 years ago
parent 354d14515f
commit 460a8e3189
  1. 6
      selfdrive/loggerd/uploader.py

@ -67,11 +67,13 @@ def clear_locks(root):
def is_on_wifi(): def is_on_wifi():
# ConnectivityManager.getActiveNetworkInfo() # ConnectivityManager.getActiveNetworkInfo()
try: try:
result = android.parse_service_call_string(["connectivity", "2"]) # TODO: figure out why the android service call sometimes dies with SIGUSR2 (signal from MSGQ)
result = android.parse_service_call_string(android.service_call(["connectivity", "2"]))
if result is None: if result is None:
return True return True
return 'WIFI' in result return 'WIFI' in result
except AttributeError: except (AttributeError, subprocess.CalledProcessError):
cloudlog.exception("is_on_wifi failed")
return False return False
def is_on_hotspot(): def is_on_hotspot():

Loading…
Cancel
Save