check if urldata.url is None

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3219 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2006-05-16 22:14:34 +00:00
parent 224f5e723b
commit 00a60c6906

View file

@ -72,8 +72,11 @@ class Aggregate (object):
url_data = self.urlqueue.get()
if url_data is not None:
try:
url = self.config['logger'].encode(url_data.url)
threading.currentThread().setName(url)
if url_data.url is None:
url = ""
else:
url = url_data.url.encode("ascii", "replace")
threading.currentThread().setName("Thread-%s" % url)
if not url_data.has_result:
url_data.check()
self.logger.log_url(url_data)