From 763af17e717ea5e212c7979f62d6e6e54ff1035b Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 17 Feb 2013 14:59:34 +0000 Subject: [PATCH] Add tracker host details to debug logging --- deluge/ui/tracker_icons.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/deluge/ui/tracker_icons.py b/deluge/ui/tracker_icons.py index c475381f5..8bfbdcfcd 100644 --- a/deluge/ui/tracker_icons.py +++ b/deluge/ui/tracker_icons.py @@ -213,7 +213,7 @@ class TrackerIcons(Component): """ if not url: url = self.host_to_url(host) - log.debug("Downloading %s", url) + log.debug("Downloading %s %s", host, url) return download_file(url, mkstemp()[1], force_filename=True) def on_download_page_complete(self, page): @@ -275,6 +275,7 @@ class TrackerIcons(Component): os.remove(page) except Exception, e: log.warning("Couldn't remove temp file: %s", e) + return parser.get_icons() def on_parse_complete(self, icons, host): @@ -288,10 +289,10 @@ class TrackerIcons(Component): :returns: the icons that were extracted from the page :rtype: list """ - log.debug("Got icons for %s: %s", host, icons) + log.debug("Parse Complete, got icons for %s: %s", host, icons) url = self.host_to_url(host) icons = [(urljoin(url, icon), mimetype) for icon, mimetype in icons] - log.debug("Icon urls: %s", icons) + log.debug("Icon urls from %s: %s", host, icons) return icons def on_parse_fail(self, f): @@ -362,7 +363,7 @@ class TrackerIcons(Component): :returns: the icon that finished downloading :rtype: TrackerIcon """ - log.debug("Successfully downloaded: %s", icon_name) + log.debug("Successfully downloaded from %s: %s", host, icon_name) icon = TrackerIcon(icon_name) return icon @@ -381,7 +382,7 @@ class TrackerIcons(Component): :rtype: Deferred or Failure """ error_msg = f.getErrorMessage() - log.debug("Error downloading icon: %s", error_msg) + log.debug("Error downloading icon from %s: %s", host, error_msg) d = f if f.check(PageRedirect): # Handle redirect errors