MCPcopy Create free account
hub / github.com/aws/aws-cli / _refresh

Method _refresh

awscli/botocore/tokens.py:92–104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

90 return self._frozen_token
91
92 def _refresh(self):
93 # If we don't need to refresh just return
94 refresh_type = self._should_refresh()
95 if not refresh_type:
96 return None
97
98 # Block for refresh if we're in the mandatory refresh window
99 block_for_refresh = refresh_type == "mandatory"
100 if self._refresh_lock.acquire(block_for_refresh):
101 try:
102 self._protected_refresh()
103 finally:
104 self._refresh_lock.release()
105
106 def _protected_refresh(self):
107 # This should only be called after acquiring the refresh lock

Callers 1

get_frozen_tokenMethod · 0.95

Calls 4

_should_refreshMethod · 0.95
_protected_refreshMethod · 0.95
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected