mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-17 06:20:27 +00:00
Merge pull request #675 from cjmayo/mx
Replace deprecated dns.resolver.query()
This commit is contained in:
commit
afccdb9608
2 changed files with 2 additions and 1 deletions
|
|
@ -328,7 +328,7 @@ class MailtoUrl(urlbase.UrlBase):
|
|||
tag=WARN_MAIL_NO_MX_HOST,
|
||||
)
|
||||
try:
|
||||
answers = resolver.query(domain, 'A')
|
||||
answers = resolver.resolve(domain, 'A', search=True)
|
||||
except DNSException:
|
||||
answers = []
|
||||
if len(answers) == 0:
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class TestFile(LinkCheckTest):
|
|||
]
|
||||
self.direct(url, resultlines, confargs=confargs)
|
||||
|
||||
@need_network
|
||||
def test_no_error(self):
|
||||
""" Test that unmatched errors are not ignored. """
|
||||
self._test("mailto:good@example.com", "", "", True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue