mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 15:28:28 +01:00
Update dvc/external_repo.py
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
committed by
pawel
co-authored by
Ruslan Kuprieiev
parent
48d16f6cc5
commit
4a6a1b662d
+3
-2
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user