(repo, url)
| 10 | |
| 11 | @contextmanager |
| 12 | def _wrap_exceptions(repo, url): |
| 13 | from dvc.config import NoRemoteError |
| 14 | from dvc.exceptions import NoOutputInExternalRepoError, NoRemoteInExternalRepoError |
| 15 | |
| 16 | try: |
| 17 | yield |
| 18 | except NoRemoteError as exc: |
| 19 | raise NoRemoteInExternalRepoError(url) from exc |
| 20 | except OutputNotFoundError as exc: |
| 21 | if exc.repo is repo: |
| 22 | raise NoOutputInExternalRepoError(exc.output, repo.root_dir, url) from exc |
| 23 | raise |
| 24 | except FileMissingError as exc: |
| 25 | raise PathMissingError(exc.path, url) from exc |
| 26 | |
| 27 | |
| 28 | def get_url( |
no test coverage detected
searching dependent graphs…