summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index d21aab2..c1e0826 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -2353,6 +2353,10 @@ def dkim_get_txt(name: bytes, timeout: int = 5):
if txtdata.find(b'p=') >= 0:
_DKIM_DNS_CACHE[name] = txtdata
return txtdata
+ except AttributeError:
+ # Try the native call
+ _DKIM_DNS_CACHE[name] = dkim.dnsplug.get_txt(name, timeout)
+ return _DKIM_DNS_CACHE[name]
except dns.resolver.NXDOMAIN:
pass
_DKIM_DNS_CACHE[name] = None