mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-22 07:04:44 +00:00
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:
parent
0f82b6f461
commit
3f749b342c
1 changed files with 4 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue