From 7a3cfd7d438ece3bd80c9ccb9d59dab66d309a08 Mon Sep 17 00:00:00 2001 From: Adina Wagner Date: Wed, 14 Jun 2023 10:24:00 +0200 Subject: [PATCH] BF: handle uninstalled subdatasets more gracefully Fixes #7429 --- datalad/distributed/create_sibling_gitlab.py | 23 ++++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/datalad/distributed/create_sibling_gitlab.py b/datalad/distributed/create_sibling_gitlab.py index 98ac2f4fa3..e4c31c8816 100644 --- a/datalad/distributed/create_sibling_gitlab.py +++ b/datalad/distributed/create_sibling_gitlab.py @@ -298,16 +298,21 @@ def __call__( return_type='list') if not subds: # we didn't find anything to operate on, let the user know - for p in path: + res_kwargs = {'status': 'impossible', 'refds': ds.path, + 'type':'dataset', 'logger': lgr, + 'action': 'create_sibling_gitlab'} + if path is not None: + for p in path: + yield dict( + path=p, + message=('No installed dataset found under %s, forgot to "get" it?' % p), + **res_kwargs + ) + else: yield dict( - action='create_sibling_gitlab', - status='impossible', - refds=ds.path, - path=p, - message=('No dataset found under %s' % p), - type='dataset', - logger=lgr, - ) + path=ds.path, + message=('No installed subdatasets found underneath %s, forgot to "get" any?' % ds.path), + **res_kwargs) else: for sub in subds: for r in _proc_dataset(