Skip to content

Commit

Permalink
race-condition to check account_id (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
athiruma authored Nov 18, 2024
1 parent 10a6a2f commit c9927e8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ class IBMAuthenticator:
def __init__(self):
logging.disable(logging.DEBUG)
self.env_config = environment_variables
self.account_id = self.env_config.IBM_ACCOUNT_ID
if hasattr(self.env_config, 'IBM_ACCOUNT_ID'):
self.account_id = self.env_config.IBM_ACCOUNT_ID
else:
self.account_id = self.env_config.environment_variables_dict.get('ACCOUNT_ID')
if hasattr(self.env_config, 'IBM_CLOUD_API_KEY'):
self.__api_key = self.env_config.IBM_CLOUD_API_KEY
else:
Expand Down

0 comments on commit c9927e8

Please sign in to comment.