Don't log a warning if commandline URL has been redirected.

This commit is contained in:
Bastian Kleineidam 2010-10-26 16:24:27 +02:00
parent 5e9c36e0c9
commit d9e981e497
4 changed files with 3 additions and 11 deletions

View file

@ -3,6 +3,8 @@
Fixes:
Changes:
- cmdline: Don't log a warning if URL has been redirected.
Closes: SF bug #3078820
Features:

View file

@ -205,13 +205,7 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
"a GET request was used instead.") %
{"name": server})
# redirections might have changed the URL
newurl = urlparse.urlunsplit(self.urlparts)
if self.url != newurl:
if self.warn_redirect:
log.warn(LOG_CHECK, _("""URL `%(url)s' has been redirected.
Use URL `%(newurl)s' instead for checking.""") % {
'url': self.url, 'newurl': newurl})
self.url = newurl
self.url = urlparse.urlunsplit(self.urlparts)
# check response
if response:
self.check_response(response)

View file

@ -129,8 +129,6 @@ class UrlBase (object):
url = absolute_url(base_url, base_ref, parent_url)
# assume file link if no scheme is found
self.scheme = url.split(":", 1)[0] or "file"
# warn if URL is redirected (for commandline client)
self.warn_redirect = False
def reset (self):
"""

View file

@ -553,8 +553,6 @@ def aggregate_url (aggregate, config, url):
# syntactic sugar
url = "ftp://%s" % url
url_data = get_url_from(url, 0, aggregate)
# warn if redirected since intern patterns do not match anymore then
url_data.warn_redirect = True
try:
linkcheck.add_intern_pattern(url_data, config)
except UnicodeError: