enumerate
This commit is contained in:
@ -31,10 +31,9 @@ def get_object(key: str, bucket: str) -> bytes:
|
|||||||
|
|
||||||
def get_object_tag(key: str, bucket: str, tag_key: str) -> Union[str, None]:
|
def get_object_tag(key: str, bucket: str, tag_key: str) -> Union[str, None]:
|
||||||
tags = get_object_tags(key, bucket)
|
tags = get_object_tags(key, bucket)
|
||||||
tag_index = 0
|
|
||||||
|
|
||||||
while tag_index < len(tags):
|
for i, tag in enumerate(tags):
|
||||||
tag = tags[tag_index]
|
tag = tags[i]
|
||||||
if tag['Key'] == tag_key:
|
if tag['Key'] == tag_key:
|
||||||
return tag
|
return tag
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user