From ddd10548c8e7619786ec9faeab47fe046a2d53bf Mon Sep 17 00:00:00 2001 From: Zach Shepherd Date: Wed, 24 May 2017 10:37:08 -0700 Subject: [PATCH] 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. --- certbot-route53/certbot_route53/authenticator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/certbot-route53/certbot_route53/authenticator.py b/certbot-route53/certbot_route53/authenticator.py index 855165455..1f1f78bfc 100644 --- a/certbot-route53/certbot_route53/authenticator.py +++ b/certbot-route53/certbot_route53/authenticator.py @@ -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)