Skip to content

Commit

Permalink
fix sub v3 iterator page location
Browse files Browse the repository at this point in the history
  • Loading branch information
jchapian committed Oct 31, 2024
1 parent da52249 commit d4fbb70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcp_flowlogs_reader/gcp_flowlogs_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def page_helper(logging_client, wait_time=1.0, **kwargs):

# google-cloud-logging < 3.0 requires us to handle paging
kwargs['page_token'] = None
iterator = logging_client.list_entries(**kwargs)
while True:
try:
iterator = logging_client.list_entries(**kwargs)
for page in iterator.pages:
kwargs['page_token'] = iterator.next_page_token
yield from page
Expand Down

0 comments on commit d4fbb70

Please sign in to comment.