|
|
@ -2,6 +2,7 @@ import os |
|
|
|
import posixpath |
|
|
|
import posixpath |
|
|
|
import socket |
|
|
|
import socket |
|
|
|
from functools import cache |
|
|
|
from functools import cache |
|
|
|
|
|
|
|
from openpilot.common.retry import retry |
|
|
|
from urllib.parse import urlparse |
|
|
|
from urllib.parse import urlparse |
|
|
|
|
|
|
|
|
|
|
|
from openpilot.tools.lib.url_file import URLFile |
|
|
|
from openpilot.tools.lib.url_file import URLFile |
|
|
@ -9,6 +10,8 @@ from openpilot.tools.lib.url_file import URLFile |
|
|
|
DATA_ENDPOINT = os.getenv("DATA_ENDPOINT", "http://data-raw.comma.internal/") |
|
|
|
DATA_ENDPOINT = os.getenv("DATA_ENDPOINT", "http://data-raw.comma.internal/") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@cache |
|
|
|
|
|
|
|
@retry(delay=0.0) |
|
|
|
def internal_source_available(url: str) -> bool: |
|
|
|
def internal_source_available(url: str) -> bool: |
|
|
|
if os.path.isdir(url): |
|
|
|
if os.path.isdir(url): |
|
|
|
return True |
|
|
|
return True |
|
|
|