mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-05 21:24:45 +00:00
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:
parent
7968642592
commit
36db68852f
1 changed files with 8 additions and 0 deletions
|
|
@ -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"])):
|
||||
|
|
|
|||
Loading…
Reference in a new issue