Skip to content

Commit

Permalink
Update dvc/external_repo.py
Browse files Browse the repository at this point in the history
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
  • Loading branch information
pared and efiop committed Nov 13, 2019
1 parent 48d16f6 commit 4a6a1b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dvc/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,10 @@ class CollectCacheError(DvcException):


class RemoteNotSpecifiedInExternalRepoError(DvcException):
def __init__(self, url):
def __init__(self, url, cause=None):
super(RemoteNotSpecifiedInExternalRepoError, self).__init__(
"No DVC remote is specified in the target repository '{}'".format(
url
)
),
cause=cause,
)
4 changes: 2 additions & 2 deletions dvc/external_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def external_repo(url=None, rev=None, rev_lock=None, cache_dir=None):
repo = Repo(path)
try:
yield repo
except NoRemoteError:
raise RemoteNotSpecifiedInExternalRepoError(url)
except NoRemoteError as exc:
raise RemoteNotSpecifiedInExternalRepoError(url, cause=exc)
repo.close()


Expand Down

0 comments on commit 4a6a1b6

Please sign in to comment.