1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00

route53: re-use boto3 client in wait (#4724)

This change re-uses the boto3 client in the wait method of the route53
authenticator in order to make it more mockable for testing purposes.
This commit is contained in:
Zach Shepherd
2017-05-24 10:37:08 -07:00
committed by GitHub
parent 033c995bd2
commit ddd10548c8

View File

@@ -137,9 +137,8 @@ class Authenticator(common.Plugin):
"""Wait for a change to be propagated to all Route53 DNS servers.
https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html
"""
client = boto3.client("route53")
for n in range(0, 120):
response = client.get_change(Id=change_id)
response = self.r53.get_change(Id=change_id)
if response["ChangeInfo"]["Status"] == "INSYNC":
return
time.sleep(5)