rawgpsd: accept alt assistance file (#29202)
Co-authored-by: Comma Device <device@comma.ai> old-commit-hash: 42e106dd476b0831048bac9654cb3471911200ca
This commit is contained in:
@@ -6,6 +6,7 @@ import itertools
|
||||
import math
|
||||
import time
|
||||
import pycurl
|
||||
import shutil
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
from multiprocessing import Process, Event
|
||||
@@ -145,6 +146,10 @@ def downloader_loop(event):
|
||||
if os.path.exists(ASSIST_DATA_FILE):
|
||||
os.remove(ASSIST_DATA_FILE)
|
||||
|
||||
alt_path = os.getenv("QCOM_ALT_ASSISTANCE_PATH", None)
|
||||
if alt_path is not None and os.path.exists(alt_path):
|
||||
shutil.copyfile(alt_path, ASSIST_DATA_FILE)
|
||||
|
||||
try:
|
||||
while not os.path.exists(ASSIST_DATA_FILE) and not event.is_set():
|
||||
download_assistance()
|
||||
|
||||
Reference in New Issue
Block a user