(self)
| 1070 | self._popen = popen |
| 1071 | |
| 1072 | def load(self): |
| 1073 | credential_process = self._credential_process |
| 1074 | if credential_process is None: |
| 1075 | return |
| 1076 | |
| 1077 | register_feature_id('CREDENTIALS_PROFILE_PROCESS') |
| 1078 | creds_dict = self._retrieve_credentials_using(credential_process) |
| 1079 | register_feature_id('CREDENTIALS_PROCESS') |
| 1080 | if creds_dict.get('expiry_time') is not None: |
| 1081 | return RefreshableCredentials.create_from_metadata( |
| 1082 | creds_dict, |
| 1083 | lambda: self._retrieve_credentials_using(credential_process), |
| 1084 | self.METHOD, |
| 1085 | ) |
| 1086 | |
| 1087 | return Credentials( |
| 1088 | access_key=creds_dict['access_key'], |
| 1089 | secret_key=creds_dict['secret_key'], |
| 1090 | token=creds_dict.get('token'), |
| 1091 | method=self.METHOD, |
| 1092 | account_id=creds_dict.get('account_id'), |
| 1093 | ) |
| 1094 | |
| 1095 | def _retrieve_credentials_using(self, credential_process): |
| 1096 | # We're not using shell=True, so we need to pass the |
nothing calls this directly
no test coverage detected