Skip to content

Commit

Permalink
Update datalad_container/containers_run.py
Browse files Browse the repository at this point in the history
Co-authored-by: Yaroslav Halchenko <[email protected]>
  • Loading branch information
bpinsard and yarikoptic committed Mar 14, 2024
1 parent 06dcb0d commit a7686a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datalad_container/containers_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,14 @@ def __call__(cmd, container_name=None, dataset=None,

lgr.debug("extra_inputs = %r", extra_inputs)

if len(assume_ready) == 0:
if not assume_ready:
assume_ready = None
elif len(assume_ready) == 1:
assume_ready = assume_ready[0]
elif "inputs" in assume_ready and "outputs" in assume_ready:
assume_ready = "both"

Check warning on line 205 in datalad_container/containers_run.py

View check run for this annotation

Codecov / codecov/patch

datalad_container/containers_run.py#L202-L205

Added lines #L202 - L205 were not covered by tests
else:
raise ValueError(f"Ended up with assume_ready={assume_ready!r} which must have not happened")

Check warning on line 207 in datalad_container/containers_run.py

View check run for this annotation

Codecov / codecov/patch

datalad_container/containers_run.py#L207

Added line #L207 was not covered by tests

with patch.dict('os.environ',
{CONTAINER_NAME_ENVVAR: container['name']}):
Expand Down

0 comments on commit a7686a5

Please sign in to comment.