Changeset 7c9eea


Ignore:
Timestamp:
05/08/2010 05:50:57 AM (15 years ago)
Author:
John Garland <johnnybg+deluge@gmail.com>
Children:
6bb4559
Parents:
152475
git-author:
John Garland <johnnybg+deluge@gmail.com> (05/08/2010 05:50:04 AM)
git-committer:
John Garland <johnnybg+deluge@gmail.com> (05/08/2010 05:50:57 AM)
Message:

Try favicon.ico if there's a HTMLParseError

File:
1 edited

Legend:

Unmodified
Added
Removed
  • deluge/ui/tracker_icons.py

    r152475 r7c9eea  
    3535
    3636import os
    37 from HTMLParser import HTMLParser
     37from HTMLParser import HTMLParser, HTMLParseError
    3838from urlparse import urljoin, urlparse
    3939from tempfile import mkstemp
     
    353353        elif f.check(error.NoResource, error.ForbiddenResource) and icons:
    354354            d = self.download_icon(icons, host)
    355         elif f.check(IndexError):
     355        elif f.check(IndexError, HTMLParseError):
    356356            # No icons, try favicon.ico as an act of desperation
    357357            d = self.download_icon([(urljoin(host_to_url(host), "favicon.ico"), extension_to_mimetype("ico"))], host)
Note: See TracChangeset for help on using the changeset viewer.