busy servers fixed, add warning

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@417 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2002-05-05 14:57:47 +00:00
parent 0f82b6f461
commit 3f749b342c

View file

@ -70,7 +70,7 @@ class NntpUrlData (UrlData):
introduced error codes 504 and 505 (both inclining "Too busy, retry
later", are caught."""
tries = 0
nntp = None
nntp = value = None
while tries < 5:
tries += 1
try:
@ -82,8 +82,10 @@ class NntpUrlData (UrlData):
time.sleep(whrandom.randint(10,20))
else:
raise
if nttp is None:
if nntp is None:
raise linkcheck.error(_("NTTP server too busy; tried more than %d times")%tries)
if value is not None:
self.setWarning(linkcheck._("NNTP busy: %s")%str(value))
return nntp
def getCacheKey (self):