eliminate xx filereader (#23514)

* eliminate xx filereader

* framereader cleanup
old-commit-hash: d5f4fdb1db
commatwo_master
Greg Hogan 3 years ago committed by GitHub
parent 597535c014
commit 0b659ce9b6
  1. 5
      tools/lib/filereader.py
  2. 5
      tools/lib/framereader.py
  3. 5
      tools/lib/logreader.py

@ -1,6 +1,11 @@
import os
from tools.lib.url_file import URLFile
DATA_PREFIX = os.getenv("DATA_PREFIX", "http://data-raw.internal/")
def FileReader(fn, debug=False):
if fn.startswith("cd:/"):
fn.replace("cd:/", DATA_PREFIX)
if fn.startswith("http://") or fn.startswith("https://"):
return URLFile(fn, debug=debug)
return open(fn, "rb")

@ -17,10 +17,7 @@ from tools.lib.cache import cache_path_for_file_path
from tools.lib.exceptions import DataUnreadableError
from common.file_helpers import atomic_write_in_dir
try:
from xx.chffr.lib.filereader import FileReader
except ImportError:
from tools.lib.filereader import FileReader
from tools.lib.filereader import FileReader
HEVC_SLICE_B = 0
HEVC_SLICE_P = 1

@ -5,10 +5,7 @@ import bz2
import urllib.parse
import capnp
try:
from xx.chffr.lib.filereader import FileReader
except ImportError:
from tools.lib.filereader import FileReader
from tools.lib.filereader import FileReader
from cereal import log as capnp_log
# this is an iterator itself, and uses private variables from LogReader

Loading…
Cancel
Save