Skip to content

Commit f2d3199

Browse files
Merge pull request #318 from millcrest/patch/fix-unbound-error
add data_offsets initialization in cog_validate function
2 parents 46557b9 + 018341e commit f2d3199

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

rio_cogeo/cogeo.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,9 @@ def cog_validate( # noqa: C901
614614
yblocks = (src.height + block_size[1] - 1) // block_size[1]
615615
xblocks = (src.width + block_size[0] - 1) // block_size[0]
616616

617+
data_offsets = []
618+
details["data_offsets"] = {}
619+
617620
# Find the first block with a valid block_offset
618621
for y in range(yblocks):
619622
for x in range(xblocks):

0 commit comments

Comments
 (0)