From b2cf40151fd7348b00a76f780e00dd6bbf800fde Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Wed, 27 Oct 2010 09:15:46 +0200 Subject: [PATCH] Improved redirection warning text. --- linkcheck/checker/httpurl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index 9e12f261..528d778d 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -388,16 +388,16 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport): return -1, response # in case of changed scheme make new URL object if self.urlparts[0] != self.scheme: - if set_result: - self.add_warning( - _("Redirection to different URL type encountered; " - "the original URL was `%(url)s'.") % - {"url": self.url}, - tag=WARN_HTTP_WRONG_REDIRECT) newobj = get_url_from( redirected, self.recursion_level, self.aggregate, parent_url=self.parent_url, base_ref=self.base_ref, line=self.line, column=self.column, name=self.name) + if set_result: + self.add_warning( + _("Redirection to URL `%(newurl)s' with different scheme" + " found; the original URL was `%(url)s'.") % + {"url": self.url, "newurl": newobj.url}, + tag=WARN_HTTP_WRONG_REDIRECT) # append new object to queue self.aggregate.urlqueue.put(newobj) # pretend to be finished and logged