diff options
author | vg <vgm+dev@devys.org> | 2021-02-21 13:00:17 +0100 |
---|---|---|
committer | vg <vgm+dev@devys.org> | 2021-02-21 13:00:17 +0100 |
commit | 9aa60992fbc87cb3c5cc21421ef7e59038d90540 (patch) | |
tree | d82221cb288c1df9d803847424ac52097d364769 | |
parent | 4338401912e3a415bf0a056c521cef612e29888c (diff) | |
download | acme-dns-tiny-9aa60992fbc87cb3c5cc21421ef7e59038d90540.tar.gz acme-dns-tiny-9aa60992fbc87cb3c5cc21421ef7e59038d90540.tar.bz2 acme-dns-tiny-9aa60992fbc87cb3c5cc21421ef7e59038d90540.zip |
add compatibility for older dnspython releases
-rw-r--r-- | acme_dns_tiny.py | 6 |
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 |