Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-25754: Protect log message against no results from query #137

Merged
merged 1 commit into from
Jul 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion python/lsst/pipe/base/graphBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ def connectDataIds(self, registry, collections, userQuery):
)
# Iterate over query results, populating data IDs for datasets and
# quanta and then connecting them to each other.
n = -1 # If we had no results
for n, commonDataId in enumerate(resultIter):
# Create DatasetRefs for all DatasetTypes from this result row,
# noting that we might have created some already.
Expand Down Expand Up @@ -553,7 +554,10 @@ def connectDataIds(self, registry, collections, userQuery):
for datasetType in task.outputs:
ref = refsForRow[datasetType.name]
quantum.outputs[datasetType.name][ref.dataId] = ref
_LOG.debug("Finished processing %d rows from data ID query.", n)
if n >= 0:
_LOG.debug("Finished processing %d rows from data ID query.", n+1)
else:
_LOG.debug("Received no rows from data ID query.")

def resolveDatasetRefs(self, registry, collections, run, *, skipExisting=True):
"""Perform follow up queries for each dataset data ID produced in
Expand Down