diff --git a/datalad/customremotes/archives.py b/datalad/customremotes/archives.py index 2ec905dc67..3363d5c407 100644 --- a/datalad/customremotes/archives.py +++ b/datalad/customremotes/archives.py @@ -312,7 +312,7 @@ def checkurl(self, url): else: # TODO: theoretically we should first check if key is available # from any remote to know if file is available - return False + raise RemoteError(f"archive key {akey} is not available locally.") def checkpresent(self, key): # TODO: so we need to maintain mapping from urls to keys. Then diff --git a/datalad/customremotes/datalad.py b/datalad/customremotes/datalad.py index 673c7695de..b50b17b164 100644 --- a/datalad/customremotes/datalad.py +++ b/datalad/customremotes/datalad.py @@ -13,6 +13,9 @@ import logging from urllib.parse import urlparse +from datalad.customremotes import RemoteError +from datalad.customremotes.base import AnnexCustomRemote +from datalad.customremotes.main import main as super_main from datalad.downloaders.providers import Providers from datalad.support.exceptions import ( CapturedException, @@ -20,10 +23,6 @@ ) from datalad.utils import unique -from datalad.customremotes import RemoteError -from datalad.customremotes.base import AnnexCustomRemote -from datalad.customremotes.main import main as super_main - lgr = logging.getLogger('datalad.customremotes.datalad') @@ -72,7 +71,7 @@ def checkurl(self, url): except Exception as exc: ce = CapturedException(exc) self.message("Failed to check url %s: %s" % (url, ce)) - return False + raise RemoteError(str(ce)) def checkpresent(self, key): resp = None