Skip to content

Commit

Permalink
clean up _resolve_account_id_builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlm committed Oct 19, 2023
1 parent c3a4168 commit 3256448
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions botocore/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ def _get_provider_params(

def _resolve_account_id_builtin(self, builtins):
"""Resolve the ``AWS::Auth::AccountId`` builtin."""
# do this check separately so mode is only validated if it's being used
if 'AccountId' not in self._param_definitions:
return

Expand All @@ -592,9 +591,8 @@ def _resolve_account_id_builtin(self, builtins):
if not self._should_resolve_account_id_builtin():
# Unset the account ID if endpoint mode is disabled.
builtins[acct_id_builtin_key] = None
return

if builtins.get(acct_id_builtin_key) is None:
elif builtins.get(acct_id_builtin_key) is None:
self._do_resolve_account_id_builtin(builtins)

def _validate_account_id_endpoint_mode(self):
Expand Down

0 comments on commit 3256448

Please sign in to comment.