mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-15 18:13:09 +00:00
Fix duplicate content warning when self.size is not set yet.
This commit is contained in:
parent
9cfee5eb5b
commit
600b7c0e69
1 changed files with 4 additions and 2 deletions
|
|
@ -758,8 +758,10 @@ class UrlBase (object):
|
|||
@ptype urls: list of unicode
|
||||
"""
|
||||
if urls:
|
||||
args = dict(urls=u",".join(urls), size=strformat.strsize(self.size))
|
||||
self.add_warning(_("Content with %(size)s is the same as in URLs (%(urls)s).") % args, tag=WARN_URL_CONTENT_DUPLICATE)
|
||||
args = dict(urls=u",".join(urls), size=u"")
|
||||
if self.size >= 0:
|
||||
args["size"] = _(" with %s") % strformat.strsize(self.size)
|
||||
self.add_warning(_("Content%(size)s is the same as in URLs (%(urls)s).") % args, tag=WARN_URL_CONTENT_DUPLICATE)
|
||||
|
||||
def check_content (self):
|
||||
"""Check content data for warnings, syntax errors, viruses etc."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue