mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-28 07:43:59 +00:00
News timeout
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@62 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
6938770a0b
commit
fadb22be36
1 changed files with 10 additions and 10 deletions
|
|
@ -180,16 +180,16 @@ class Configuration(UserDict.UserDict):
|
||||||
import nntplib
|
import nntplib
|
||||||
timeout = 1
|
timeout = 1
|
||||||
while timeout:
|
while timeout:
|
||||||
try:
|
try:
|
||||||
self.data["nntp"] = nntplib.NNTP(self.data["nntpserver"])
|
self.data["nntp"] = nntplib.NNTP(self.data["nntpserver"])
|
||||||
timeout = 0
|
timeout = 0
|
||||||
except nntplib.error_perm:
|
except nntplib.error_perm:
|
||||||
value = sys.exc_info()[1]
|
value = sys.exc_info()[1]
|
||||||
if re.compile("^505").search(str(value)):
|
if re.compile("^505").search(str(value)):
|
||||||
import whrandom,time
|
import whrandom,time
|
||||||
time.sleep(whrandom.randint(30,60))
|
time.sleep(whrandom.randint(30,60))
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def hasMoreUrls_Threads(self):
|
def hasMoreUrls_Threads(self):
|
||||||
return not self.urls.empty()
|
return not self.urls.empty()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue