mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
eca265120f
old-commit-hash: 8f1806602c4e4a70e073bf1abd8f61206864d652
7 lines
193 B
Python
7 lines
193 B
Python
from tools.lib.url_file import URLFile
|
|
|
|
def FileReader(fn, debug=False):
|
|
if fn.startswith("http://") or fn.startswith("https://"):
|
|
return URLFile(fn, debug=debug)
|
|
return open(fn, "rb")
|