Skip to content

Commit

Permalink
Handle case of zero inputs in pipeline connections.
Browse files Browse the repository at this point in the history
Prerequisite inputs can have zero entries, and should pass checks in
this case.
  • Loading branch information
czwa committed Dec 10, 2019
1 parent 204a9c6 commit 09290a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/lsst/pipe/base/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,10 @@ def buildDatasetRefs(self, quantum: Quantum) -> typing.Tuple[InputQuantizedConne
# Unpack arguments that are not marked multiples (list of
# length one)
if not attribute.multiple:
if len(quantumInputRefs) != 1:
if len(quantumInputRefs) > 1:
raise ScalarError(attributeName, len(quantumInputRefs))
if len(quantumInputRefs) == 0:
continue
quantumInputRefs = quantumInputRefs[0]
# Add to the QuantizedConnection identifier
setattr(refs, attributeName, quantumInputRefs)
Expand Down

0 comments on commit 09290a5

Please sign in to comment.