mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Fix NNTP server availability test.
This commit is contained in:
parent
1188e0be2e
commit
636b6586ef
1 changed files with 3 additions and 3 deletions
|
|
@ -150,12 +150,12 @@ need_pyftpdlib = _need_func(has_pyftpdlib, "pyftpdlib")
|
|||
|
||||
@memoized
|
||||
def has_newsserver (server):
|
||||
import nntplib
|
||||
try:
|
||||
import nntplib
|
||||
nntp = nntplib.NNTP(server, usenetrc=False)
|
||||
nntp.close()
|
||||
nntp.quit()
|
||||
return True
|
||||
except StandardError:
|
||||
except nntplib.NNTPError:
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue