Logo
Explore Help
Register Sign In
mawei/sunnypilot
1
0
Fork 0
You've already forked sunnypilot
mirror of https://github.com/sunnypilot/sunnypilot.git synced 2026-02-19 14:43:57 +08:00
Code Issues Packages Projects Releases Wiki Activity
Files
1404dabb62c42faefbc39c8a2bdd6847aa4c0fed
sunnypilot/tools/lib/filereader.py

8 lines
200 B
Python
Raw Normal View History

Tools: Storage API (#1161) * 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 old-commit-hash: c4af05868ba82d4295e3f508e8477f2f6f898834
2020-02-24 21:24:54 -05:00
from common.url_file import URLFile
merge in tools old-commit-hash: 29ac3da7b84426c6764150cb233b9c7bab1446d8
2020-01-17 10:07:22 -08:00
Tools: Storage API (#1161) * 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 old-commit-hash: c4af05868ba82d4295e3f508e8477f2f6f898834
2020-02-24 21:24:54 -05:00
def FileReader(fn, debug=False):
if fn.startswith("http://") or fn.startswith("https://"):
return URLFile(fn, debug=debug)
else:
return open(fn, "rb")
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 39ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API