Skip to content

Commit 6f4b4b0

Browse files
author
Tom Reitz
committed
fixes a bug when fetching resources without read permission
1 parent ccdd3a1 commit 6f4b4b0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lightbeam/fetch.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ async def get_records(self, do_write=True, log_status_counts=True):
3333
record_counts = self.lightbeam.results
3434
self.lightbeam.results = []
3535
for endpoint in self.lightbeam.endpoints:
36-
num_records = [x for x in record_counts if x[0] == endpoint][0][1]
36+
try:
37+
num_records = [x for x in record_counts if x[0] == endpoint][0][1]
38+
except IndexError:
39+
continue
3740
num_pages = math.ceil(num_records / limit)
3841

3942
# do the requests

0 commit comments

Comments
 (0)