Skip to content

Commit f5beedf

Browse files
qcomgpsd: use AT helper with retry for all AT commands (#31532)
old-commit-hash: 34138d0
1 parent 8256969 commit f5beedf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

system/qcomgpsd/qcomgpsd.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ def at_cmd(cmd: str) -> Optional[str]:
9494
return subprocess.check_output(f"mmcli -m any --timeout 30 --command='{cmd}'", shell=True, encoding='utf8')
9595

9696
def gps_enabled() -> bool:
97-
try:
98-
p = subprocess.check_output("mmcli -m any --command=\"AT+QGPS?\"", shell=True)
99-
return b"QGPS: 1" in p
100-
except subprocess.CalledProcessError as exc:
101-
raise Exception("failed to execute QGPS mmcli command") from exc
97+
return "QGPS: 1" in at_cmd("AT+QGPS?")
10298

10399
def download_assistance():
104100
try:

0 commit comments

Comments
 (0)