Skip to content

Commit

Permalink
race-condition to check account_id
Browse files Browse the repository at this point in the history
  • Loading branch information
athiruma committed Nov 18, 2024
1 parent b2573fa commit 713dd5d
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 713dd5d

Please sign in to comment.