From 17c4c7f68efa54f63f7c448d372e98b14939f0ca Mon Sep 17 00:00:00 2001 From: Chow Loong Jin Date: Mon, 27 Feb 2017 15:27:32 +0800 Subject: [PATCH 1/2] Use zope decorators This makes it compatible with python3. --- certbot_route53/authenticator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/certbot_route53/authenticator.py b/certbot_route53/authenticator.py index 2b941a7e5..915c0092d 100644 --- a/certbot_route53/authenticator.py +++ b/certbot_route53/authenticator.py @@ -16,9 +16,9 @@ logger = logging.getLogger(__name__) TTL = 30 +@zope.interface.implementer(interfaces.IAuthenticator) +@zope.interface.provider(interfaces.IPluginFactory) class Authenticator(common.Plugin): - zope.interface.implements(interfaces.IAuthenticator) - zope.interface.classProvides(interfaces.IPluginFactory) description = "Route53 Authenticator" From e9531dc80b75421b73f643b60c0780b6ee6fc92e Mon Sep 17 00:00:00 2001 From: Chow Loong Jin Date: Mon, 27 Feb 2017 16:57:33 +0800 Subject: [PATCH 2/2] Replace xrange with range --- certbot_route53/authenticator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certbot_route53/authenticator.py b/certbot_route53/authenticator.py index 915c0092d..7dbe8d80b 100644 --- a/certbot_route53/authenticator.py +++ b/certbot_route53/authenticator.py @@ -66,7 +66,7 @@ class Authenticator(common.Plugin): response, validation = achall.response_and_validation() self._excute_r53_action(r53, achall, zone, validation, 'UPSERT', wait_for_change=True) - for _ in xrange(TTL*2): + for _ in range(TTL*2): if response.simple_verify( achall.chall, achall.domain,