From b450c9bd324a3c89ea03d898592cfed832184802 Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Mon, 31 Aug 2020 12:25:33 +0300 Subject: [PATCH] dns: Make use of `resolve_address` of a current resolver instead of the global one For now, `resolve_address` for dnspython < 2.0.0 is actually the instance method of the global DNSResolver object and is not the instance method of the corresponding object from which it was called. This can result in unexpected behavior. Signed-off-by: Stanislav Levin Reviewed-By: Alexander Bokovoy --- ipapython/dnsutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipapython/dnsutil.py b/ipapython/dnsutil.py index 7c4ef7ace..63eb64dc1 100644 --- a/ipapython/dnsutil.py +++ b/ipapython/dnsutil.py @@ -111,7 +111,7 @@ class DNSResolver(dns.resolver.Resolver): :param ip_address: IPv4 or IPv6 address :type ip_address: str """ - return resolve( + return self.resolve( dns.reversename.from_address(ip_address), rdtype=dns.rdatatype.PTR, *args,