Skip to content

Commit

Permalink
Fixed typos and various code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cgill27 committed Jan 24, 2017
1 parent 257f8e0 commit f9cb280
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions letsencrypt_route53/authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

logger = logging.getLogger(__name__)


class Authenticator(common.Plugin):
zope.interface.implements(interfaces.IAuthenticator)
zope.interface.classProvides(interfaces.IPluginFactory)
Expand All @@ -32,7 +33,7 @@ def prepare(self): # pylint: disable=missing-docstring,no-self-use
pass # pragma: no cover

def more_info(self): # pylint: disable=missing-docstring,no-self-use
return ("")
return ""

def get_chall_pref(self, domain):
# pylint: disable=missing-docstring,no-self-use,unused-argument
Expand All @@ -50,14 +51,14 @@ def _perform_single(self, achall):
r53 = boto3.client('route53')
logger.info("Doing validation for " + response.domain)
listResponse = r53.list_hosted_zones_by_name(DNSName=response.domain)
matches = listResponse.HostedZones;
matches = listResponse.HostedZones
if matches.size != 0:
logger.error("Route53 returned " + mathces.size + " matching hosted zones. Expected exactly one. Auth canceled.")
logger.error("Route53 returned " + matches.size + " matching hosted zones. Expected exactly one. Auth canceled.")
return None
else:
r53.change_resource_record_sets(HostedZoneId=matches[0].Id,
ChangeBatch={
'Comment': 'Let\'s Entcrypt Change',
'Comment': 'Let\'s Encrypt Change',
'Changes': [
{
'Action': 'UPSERT',
Expand Down Expand Up @@ -86,7 +87,7 @@ def _perform_single(self, achall):

def cleanup(self, achalls):
# pylint: disable=missing-docstring,no-self-use,unused-argument
#TODO:Cleanup record 
# TODO:Cleanup record 
r53 = boto3.client('route53')
#for achall in achalls:
# r53.delete_object(Bucket=self.conf('s3-bucket'), Key=achall.chall.path[1:])
Expand Down

0 comments on commit f9cb280

Please sign in to comment.