Skip to content

Commit

Permalink
Drop redundant cursor close.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Apr 4, 2024
1 parent 1a33860 commit 77a4d23
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions python/lsst/daf/butler/direct_query_driver/_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,7 @@ def execute(self, result_spec: ResultSpec, tree: qt.QueryTree) -> ResultPage:
raw_page_size=raw_page_size,
)
result_page = cursor.next()
if result_page.next_key is None:
# Cursor has been exhausted; close it here.
cursor.close()
else:
if result_page.next_key is not None:
# Cursor has not been exhausted; add it to the driver for use by
# fetch_next_page.
self._cursors[result_page.next_key] = cursor
Expand Down

0 comments on commit 77a4d23

Please sign in to comment.