diff --git a/dns_scripts/dns_route53.py b/dns_scripts/dns_route53.py index 8805269..a972dfa 100755 --- a/dns_scripts/dns_route53.py +++ b/dns_scripts/dns_route53.py @@ -32,7 +32,7 @@ for zone in response['HostedZones']: zone_list[zone['Name']] = zone['Id'] for key in sorted(zone_list.iterkeys(), key=len, reverse=True): - if key in "{z}.".format(z=fqdn): + if ".{z}".format(z=key) in ".{z}.".format(z=fqdn): zone_id = zone_list[key] if zone_id == "": @@ -84,4 +84,4 @@ if action == 'UPSERT': print("Didn't find {f} entry yet, sleeping... ({w}s)".format(f=challenge_fqdn, w=waiting)) time.sleep(10) - pass \ No newline at end of file + pass