errors and warnings

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1451 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2004-08-23 20:16:53 +00:00
parent 7968642592
commit 36db68852f

View file

@ -41,6 +41,10 @@ class Consumer (object):
self.linknumber = 0
# one lock for the data
self.lock = threading.Lock()
# if checking had errors
self.errors = False
# if checking had warnings
self.warnings = False
def filter_url_queue (self):
"""remove already cached urls from queue"""
@ -152,6 +156,10 @@ class Consumer (object):
try:
self.linknumber += 1
do_filter = (self.linknumber % 1000) == 0
if not url_data.valid:
self.errors = True
if url_data.warning and self.config["warnings"]:
self.warnings = True
if not self.config['quiet'] and \
(self.config["verbose"] or not url_data.valid or
(url_data.warning and self.config["warnings"])):