From ca490f699e68d7cc75741bb653020f604183c52d Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Mon, 12 Oct 2020 12:37:19 +0300 Subject: [PATCH] ls: pass repo_tree instead of repo (#4700) --- dvc/repo/ls.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dvc/repo/ls.py b/dvc/repo/ls.py index 51878d349..21bc23157 100644 --- a/dvc/repo/ls.py +++ b/dvc/repo/ls.py @@ -38,7 +38,7 @@ def ls( if path: path_info /= path - ret = _ls(repo, path_info, recursive, dvc_only) + ret = _ls(repo.repo_tree, path_info, recursive, dvc_only) if path and not ret: raise PathMissingError(path, repo, dvc_only=dvc_only) @@ -51,12 +51,10 @@ def ls( return ret_list -def _ls(repo, path_info, recursive=None, dvc_only=False): +def _ls(tree, path_info, recursive=None, dvc_only=False): def onerror(exc): raise exc - tree = repo.repo_tree - infos = [] try: for root, dirs, files in tree.walk(