Fix empty URL handling.

This commit is contained in:
Bastian Kleineidam 2014-07-03 23:34:40 +02:00
parent e85d6a281b
commit 0fa7ed2699
3 changed files with 6 additions and 6 deletions

View file

@ -10,6 +10,8 @@ Changes:
by default since they require third party modules.
- plugins: Print a warning for enabled plugins that could not
import needed third party modules.
- checking: Treat empty URLs as same as parent URL.
Closes: GH bug #524
Fixes:
- checking: Catch XML parse errors in sitemap XML files and print them

View file

@ -315,8 +315,7 @@ class UrlBase (object):
"""
log.debug(LOG_CHECK, "checking syntax")
if self.base_url is None:
self.set_result(_("URL is missing"), valid=False)
return
self.base_url = u""
if not (self.base_url or self.parent_url):
self.set_result(_("URL is empty"), valid=False)
return

View file

@ -5,10 +5,9 @@ name %(datadir)s/misc.html
valid
url
cache key None
real url
info The URL is outside of the domain filter, checked only syntax.
error
cache key file://%(curdir)s/%(datadir)s/misc.html
real url file://%(curdir)s/%(datadir)s/misc.html
valid
url http://www.example.com/
cache key http://www.example.com/