From fadb22be366dbdc458d41b1fd8be2df7b5900aaf Mon Sep 17 00:00:00 2001 From: calvin Date: Fri, 31 Mar 2000 11:06:37 +0000 Subject: [PATCH] News timeout git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@62 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/Config.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/linkcheck/Config.py b/linkcheck/Config.py index 140c5069..a072dcdf 100644 --- a/linkcheck/Config.py +++ b/linkcheck/Config.py @@ -180,16 +180,16 @@ class Configuration(UserDict.UserDict): import nntplib timeout = 1 while timeout: - try: - self.data["nntp"] = nntplib.NNTP(self.data["nntpserver"]) - timeout = 0 - except nntplib.error_perm: - value = sys.exc_info()[1] - if re.compile("^505").search(str(value)): - import whrandom,time - time.sleep(whrandom.randint(30,60)) - else: - raise + try: + self.data["nntp"] = nntplib.NNTP(self.data["nntpserver"]) + timeout = 0 + except nntplib.error_perm: + value = sys.exc_info()[1] + if re.compile("^505").search(str(value)): + import whrandom,time + time.sleep(whrandom.randint(30,60)) + else: + raise def hasMoreUrls_Threads(self): return not self.urls.empty()