From a9f6cc561b737ffb44c912b26c788a66396298cf Mon Sep 17 00:00:00 2001 From: Joe Wang <69328902+Storce@users.noreply.github.com> Date: Sat, 26 Oct 2024 12:09:23 -0700 Subject: [PATCH] Solve Deprecation Warning with dns.Resolver.query() I've tested on staff VM, and this should not cause any problem with our current version of dnspython. query() only exists for backwards compatibility with previous versions. See: https://dnspython.readthedocs.io/en/latest/_modules/dns/resolver.html --- acct/check-dns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acct/check-dns b/acct/check-dns index ca2d36c..dbd0583 100755 --- a/acct/check-dns +++ b/acct/check-dns @@ -14,7 +14,7 @@ Record = namedtuple('Record', ('domain', 'type', 'value')) def _query(domain, record): - return resolver.query(domain, record, raise_on_no_answer=False) + return resolver.resolve(domain, record, raise_on_no_answer=False) def main(username):