Skip to content

Commit

Permalink
fix account_id property
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlm committed Sep 7, 2023
1 parent 5675dd3 commit 8874c64
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions botocore/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,16 +449,8 @@ def token(self, value):

@property
def account_id(self):
"""Warning: Using this property can lead to race conditions if you
access another property subsequently along the refresh boundary.
Please use get_frozen_credentials instead.
"""
self._refresh()
return self._account_id

@account_id.setter
def account_id(self, value):
self._account_id = value
frozen_credentials = self.get_frozen_credentials()
return frozen_credentials.account_id

def _seconds_remaining(self):
delta = self._expiry_time - self._time_fetcher()
Expand Down

0 comments on commit 8874c64

Please sign in to comment.