mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-20 02:23:54 +08:00
* add openpilot prefix to imports
* more
* more
* fix docs
* fix linter
* bump submodules
* fix patched tests
* update dynamic imports
* debug
* Revert "debug"
This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.
* fix pm test
old-commit-hash: a9626f95b6
12 lines
348 B
Python
12 lines
348 B
Python
import os
|
|
from openpilot.tools.lib.url_file import URLFile
|
|
|
|
DATA_ENDPOINT = os.getenv("DATA_ENDPOINT", "http://data-raw.comma.internal/")
|
|
|
|
def FileReader(fn, debug=False):
|
|
if fn.startswith("cd:/"):
|
|
fn = fn.replace("cd:/", DATA_ENDPOINT)
|
|
if fn.startswith(("http://", "https://")):
|
|
return URLFile(fn, debug=debug)
|
|
return open(fn, "rb")
|