mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 05:24:06 +08:00
* filereader * support URLs in filereader, logreader * unused * use route files api; add auth file * Implement browser auth * Update readme, fix up cache paths * Add tests, clear token on 401 * Factor out URLFile * space
8 lines
200 B
Python
8 lines
200 B
Python
from common.url_file import URLFile
|
|
|
|
def FileReader(fn, debug=False):
|
|
if fn.startswith("http://") or fn.startswith("https://"):
|
|
return URLFile(fn, debug=debug)
|
|
else:
|
|
return open(fn, "rb")
|