Skip to content

Commit

Permalink
Update endpoint_provider.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SamRemis committed Nov 21, 2024
1 parent 73bcd87 commit 762f499
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions botocore/endpoint_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,13 @@ def get_attr(self, value, path):
:rtype: Any
"""
for part in path.split("."):
if value is None:
return None
match = GET_ATTR_RE.search(part)
if match is not None:
name, index = match.groups()
index = int(index)
if name:
value = value.get(name)
if index >= len(value):
if value is None or index >= len(value):
return None
return value[index]
else:
Expand Down

0 comments on commit 762f499

Please sign in to comment.