Skip to content

Commit

Permalink
Change command-line to convert limit=0 to limit=None for API usage
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Sep 5, 2024
1 parent 9dfe525 commit ff0d8f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/lsst/daf/butler/script/queryDatasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,9 @@ def getDatasets(self) -> Iterator[DatasetRef]:
kwargs: dict[str, Any] = {}
if self._where:
kwargs["where"] = self._where
if not unlimited:
kwargs["limit"] = limit
# API uses 0 to mean "check query but return nothing" and None
# to mean "unlimited".
kwargs["limit"] = None if unlimited else limit
_LOG.debug("Querying dataset type %s with %s", dt, kwargs)
results = self.butler.query_datasets(
dt,
Expand Down

0 comments on commit ff0d8f9

Please sign in to comment.