summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acme_dns_tiny.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/acme_dns_tiny.py b/acme_dns_tiny.py
index d89a46a..051e6ba 100644
--- a/acme_dns_tiny.py
+++ b/acme_dns_tiny.py
@@ -129,7 +129,11 @@ def self_challenge_check(*, domain=None, ttl=None, challenge=None):
time.sleep(ttl)
log.debug('Self check number %s', checknum)
try:
- responses = resolver.resolve(domain, rdtype='TXT').rrset
+ try:
+ responses = resolver.resolve(domain, rdtype='TXT').rrset
+ except AttributeError:
+ # backward compatibility for older dns dnspython releases
+ responses = resolver.query(domain, rdtype='TXT').rrset
except dns.exception.DNSException as e:
log.debug(' - DNS error: %s: %s', type(e).__name__, e)
continue