Commit f056769b authored by Adrien Dorsaz's avatar Adrien Dorsaz

v2: show just name of DNSException in case of error)

parent 43a73a9c
Pipeline #197 passed with stage
in 8 minutes and 38 seconds
......@@ -185,7 +185,7 @@ def get_crt(config, log=LOGGER):
dnsrr_domain = (response.to_text() for response in resolver.query(dnsrr_domain, rdtype="CNAME"))
log.info(" - A CNAME resource has been found for this domain, will install TXT on {0}".format(dnsrr_domain))
except dns.exception.DNSException as dnsexception:
log.debug(" - Not any CNAME resource has been found for this domain ({1}), will install TXT directly on {0}".format(dnsrr_domain, dnsexception.msg))
log.debug(" - Not any CNAME resource has been found for this domain ({1}), will install TXT directly on {0}".format(dnsrr_domain, type(dnsexception).__name__))
dnsrr_set = dns.rrset.from_text(dnsrr_domain, config["DNS"].getint("TTL"), "IN", "TXT", '"{0}"'.format(keydigest64))
try:
_update_dns(dnsrr_set, "add")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment