eliminate xx filereader (#23514)
* eliminate xx filereader
* framereader cleanup
old-commit-hash: d5f4fdb1db
commatwo_master
parent
597535c014
commit
0b659ce9b6
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