mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-07 23:09:21 +01:00
ls-url: remove now unused _ls_url()
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
8ff92cc7b0
commit
4a558edc59
+1
-7
@@ -12,16 +12,10 @@ def parse_external_url(url, config=None):
|
||||
|
||||
def ls_url(url, config=None, recursive=False):
|
||||
fs, fs_path = parse_external_url(url, config=config)
|
||||
return _ls_url(fs, fs_path, orig_url=url, recursive=recursive)
|
||||
|
||||
|
||||
def _ls_url(fs, fs_path, orig_url=None, recursive=False):
|
||||
if orig_url is None:
|
||||
orig_url = fs_path
|
||||
try:
|
||||
info = fs.info(fs_path)
|
||||
except FileNotFoundError as exc:
|
||||
raise URLMissingError(orig_url) from exc
|
||||
raise URLMissingError(url) from exc
|
||||
if info["type"] != "directory":
|
||||
return [{"path": info["name"], "isdir": False}]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user