Skip to content

Commit

Permalink
BF: handle uninstalled subdatasets more gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
adswa committed Jul 12, 2023
1 parent 5bae877 commit 7a3cfd7
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions datalad/distributed/create_sibling_gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 7a3cfd7

Please sign in to comment.