mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-25 18:30:23 +00:00
Fix deprecation warning for resolver.query()
/home/travis/build/linkchecker/linkchecker/linkcheck/checker/mailtourl.py:321: DeprecationWarning: please use dns.resolver.resolve() instead
answers = resolver.query(domain, 'MX')
This commit is contained in:
parent
70d749a967
commit
26c15c5e67
4 changed files with 4 additions and 4 deletions
|
|
@ -319,7 +319,7 @@ class MailtoUrl(urlbase.UrlBase):
|
|||
username, domain = mail.rsplit('@', 1)
|
||||
log.debug(LOG_CHECK, "looking up MX mailhost %r", domain)
|
||||
try:
|
||||
answers = resolver.query(domain, 'MX')
|
||||
answers = resolver.resolve(domain, 'MX', search=True)
|
||||
except DNSException:
|
||||
answers = []
|
||||
if len(answers) == 0:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
beautifulsoup4
|
||||
requests >= 2.4
|
||||
pyxdg
|
||||
dnspython
|
||||
dnspython >= 2.0
|
||||
# optional:
|
||||
argcomplete
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -378,7 +378,7 @@ setup(
|
|||
python_requires=">= 3.6",
|
||||
install_requires=[
|
||||
"requests >= 2.4",
|
||||
"dnspython",
|
||||
"dnspython >= 2.0",
|
||||
"beautifulsoup4",
|
||||
"pyxdg",
|
||||
],
|
||||
|
|
|
|||
2
tox.ini
2
tox.ini
|
|
@ -30,7 +30,7 @@ deps =
|
|||
beautifulsoup4 < 4.8.1
|
||||
requests >= 2.4
|
||||
pyxdg
|
||||
dnspython
|
||||
dnspython >= 2.0
|
||||
{[base]deps}
|
||||
|
||||
[testenv:flake8]
|
||||
|
|
|
|||
Loading…
Reference in a new issue