Fix NNTP server availability test.

This commit is contained in:
Bastian Kleineidam 2010-11-06 17:27:05 +01:00
parent 1188e0be2e
commit 636b6586ef

View file

@ -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