Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
geospatial-jeff committed Dec 1, 2020
1 parent 4533970 commit 16a750f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aiocogeo/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def __len__(self):
@classmethod
async def read(cls, reader: Filesystem) -> Optional["Tag"]:
"""Read a TIFF Tag"""
# reader.seek(offset)
# 0-2 bytes of tag are tag name
code = await reader.read(2, cast_to_int=True)
if code not in TIFF_TAGS:
Expand Down Expand Up @@ -88,7 +87,7 @@ async def read(cls, reader: Filesystem) -> Optional["Tag"]:
current_size = len(reader.data)
if value_offset + length > current_size:

# we coerce the chunk size to be at least the size of the tag
# we coerce the chunk size to be big enough to read the full tag value
chunk_size = max(value_offset + length - current_size, config.HEADER_CHUNK_SIZE)
reader.data += await reader.range_request(len(reader.data), chunk_size, is_header=True)

Expand Down

0 comments on commit 16a750f

Please sign in to comment.