From aeca3ee6e0a45272486462e82fc0f6d01a5560fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Ri=C3=9Fe?= Date: Thu, 27 Feb 2025 17:58:37 +0100 Subject: [PATCH 1/2] fix: handle URLs more gracefully Previously an unknown URL (e.g. from a different special remote) would crash the uncurl remote. Additionally, if a key had more than one URL registered only one was tried in some cases. Now, if the data is not found at one location or the URLs scheme is unsupported, the next URL is tried instead. Fixes #770. --- datalad_next/annexremotes/uncurl.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/datalad_next/annexremotes/uncurl.py b/datalad_next/annexremotes/uncurl.py index 2e9af454..d1f3c3aa 100644 --- a/datalad_next/annexremotes/uncurl.py +++ b/datalad_next/annexremotes/uncurl.py @@ -528,10 +528,13 @@ def _check_retrieve( handler(url) # we succeeded, no need to try again return True - except UrlOperationsResourceUnknown: - # general system access worked, but at the key location is nothing - # to be found - return False + except (UrlOperationsResourceUnknown, ValueError): + # UrlOperationsResourceUnknown: general system access worked, but + # at the key location is nothing to be found + # ValueError: something else went wrong trying to handle the URL + # (e.g. unknown scheme) + # -> try the next URL + pass except UrlOperationsRemoteError as e: # return False only if we could be sure that the remote # system works properly and just the key is not around From 8027fe3c2d2c76f5c5c40b010d7aee5f4a04b3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Ri=C3=9Fe?= Date: Thu, 27 Feb 2025 18:24:30 +0100 Subject: [PATCH 2/2] chore: add myself to .zenodo.json --- .zenodo.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.zenodo.json b/.zenodo.json index b0545361..729243c2 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -31,6 +31,11 @@ "name": "Poldrack, Benjamin", "orcid": "0000-0001-7628-0801" }, + { + "affiliation": "Institute of Climate and Energy Systems - Stratosphere (ICE-4), Forschungszentrum Jülich, Jülich, Germany", + "name": "Riße, Matthias", + "orcid": "0009-0006-6081-9327" + }, { "affiliation": "Institute of Neuroscience and Medicine, Brain & Behaviour (INM-7), Research Centre Jülich, Jülich, Germany", "name": "Szczepanik, Michał", @@ -57,4 +62,4 @@ "access_right": "open", "license": "MIT", "upload_type": "software" -} \ No newline at end of file +}