When a catalog has its homepage already set, directly calling catalog_set(reckless="overwrite") updates the setting, but yields both "ok" and "impossible" results.
catalog_set(ok): catalog [Home page successfully set to: dataset_id=1234, dataset_version=latest.]
catalog_set(impossible): catalog [Home page already set: dataset_id=1234, dataset_version=2137.To overwrite this property, use '--reckless overwrite']
action summary:
catalog_set (impossible: 1, ok: 1)
(...)
datalad.support.exceptions.IncompleteResultsError: Command did not complete successfully. 1 failed:
(...)
This is because when catalog_set() is called, yield does not terminate execution, and the code seems to be taking a shortcut / missing an else statement.
(although, when used inside another function, yield from catalog_set() would indeed stop at first yield.
When a catalog has its homepage already set, directly calling
catalog_set(reckless="overwrite")
updates the setting, but yields both "ok" and "impossible" results.This is because when
catalog_set()
is called,yield
does not terminate execution, and the code seems to be taking a shortcut / missing anelse
statement.(although, when used inside another function,
yield from catalog_set()
would indeed stop at firstyield
.