From: Oleg Broytman Date: Sat, 13 Oct 2007 09:03:41 +0000 (+0000) Subject: Clear bookmark's icon in advance, before any error occurs. X-Git-Tag: v4.5.3~283 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=74c815aa9af0b6947b1a2caeb390bade05b5e1ca;p=bookmarks_db.git Clear bookmark's icon in advance, before any error occurs. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@93 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- diff --git a/Robots/bkmk_rsimple.py b/Robots/bkmk_rsimple.py index 63c0b4c..1842b4d 100644 --- a/Robots/bkmk_rsimple.py +++ b/Robots/bkmk_rsimple.py @@ -90,6 +90,8 @@ class robot_simple(Robot): try: try: self.start = int(time.time()) + bookmark.icon = None + url_type, url_rest = urllib.splittype(bookmark.href) url_host, url_path = urllib.splithost(url_rest) url_path, url_tag = urllib.splittag(url_path) @@ -183,8 +185,6 @@ class robot_simple(Robot): content_type = headers["Content-Type"] if content_type.startswith("image/"): bookmark.icon = "data:%s;base64,%s" % (content_type, b64encode(icon)) - else: - bookmark.icon = None except KeyError: pass