Skip to content

Commit

Permalink
fetch: catch collection errors in revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Jul 10, 2023
1 parent 4de4f0f commit 6756666
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dvc/repo/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def fetch( # noqa: C901, PLR0913

indexes = []
index_keys = set()
for _ in self.brancher(
for rev in self.brancher(
revs=revs,
all_branches=all_branches,
all_tags=all_tags,
Expand All @@ -77,6 +77,12 @@ def fetch( # noqa: C901, PLR0913
)
index_keys.add(idx.data_tree.hash_info.value)
indexes.append(idx.data["repo"])
except Exception: # pylint: disable=broad-except
failed_count += 1
logger.exception(
"failed to collect '%s'",
rev or "workspace",
)
finally:
if remote:
self.config["core"]["remote"] = saved_remote
Expand Down

0 comments on commit 6756666

Please sign in to comment.