Skip to content

Commit

Permalink
ls: pass repo_tree instead of repo (#4700)
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop authored Oct 12, 2020
1 parent 59105ec commit ca490f6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dvc/repo/ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(
Expand Down

0 comments on commit ca490f6

Please sign in to comment.