Handle get_network_type exception

old-commit-hash: 98f5d30455
This commit is contained in:
Willem Melching
2020-02-03 11:28:38 -08:00
parent 398fb87509
commit e6c548eff9
2 changed files with 13 additions and 2 deletions
+4 -1
View File
@@ -5,6 +5,9 @@ import re
import struct
import subprocess
import random
from cereal import log
NetworkType = log.ThermalData.NetworkType
ANDROID = os.path.isfile('/EON')
@@ -90,7 +93,7 @@ def parse_service_call_bytes(ret):
except Exception:
return None
def get_network_type(NetworkType):
def get_network_type():
wifi_check = parse_service_call_string(service_call(["connectivity", "2"]))
if wifi_check is None:
return NetworkType.none