Skip to content

Commit

Permalink
minor update for retry
Browse files Browse the repository at this point in the history
  • Loading branch information
liamschn committed Jul 15, 2024
1 parent 8faca07 commit 7fec328
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ def associate_admin_account(delegated_admin_account_id: str) -> None:
except botocore.exceptions.ClientError as error:
LOGGER.info(f"Attempt {i_retry} - error associating admin account: {error.response['Error']['Message']}")
associated = False
if associated is True:
break
else:
i_retry += 1
if associated is False:
LOGGER.error("Unable to associate admin account.")
raise ValueError("Unable to associate admin account.")
Expand Down

0 comments on commit 7fec328

Please sign in to comment.