parent
2c94f15584
commit
d5f4fdb1db
3 changed files with 7 additions and 8 deletions
@ -1,6 +1,11 @@ |
|||||||
|
import os |
||||||
from tools.lib.url_file import URLFile |
from tools.lib.url_file import URLFile |
||||||
|
|
||||||
|
DATA_PREFIX = os.getenv("DATA_PREFIX", "http://data-raw.internal/") |
||||||
|
|
||||||
def FileReader(fn, debug=False): |
def FileReader(fn, debug=False): |
||||||
|
if fn.startswith("cd:/"): |
||||||
|
fn.replace("cd:/", DATA_PREFIX) |
||||||
if fn.startswith("http://") or fn.startswith("https://"): |
if fn.startswith("http://") or fn.startswith("https://"): |
||||||
return URLFile(fn, debug=debug) |
return URLFile(fn, debug=debug) |
||||||
return open(fn, "rb") |
return open(fn, "rb") |
||||||
|
Loading…
Reference in new issue