]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rsimple.py
Remove all temporary files with urlcleanup().
[bookmarks_db.git] / Robots / bkmk_rsimple.py
index 69636d9ef09044905962a3930fc8789e32b45ebc..63f96027c2f5d2458b22d697c6aad34797ce90ff 100644 (file)
@@ -105,6 +105,7 @@ icons = {} # Icon cache; maps URL to a tuple (content type, data)
 
 class robot_simple(Robot):
    def check_url(self, bookmark):
+      fname = None
       try:
          self.start = int(time.time())
          bookmark.icon = None
@@ -240,7 +241,6 @@ class robot_simple(Robot):
                         else:
                            self.log("   no icon        : bad content type '%s'" % content_type)
                            icons[icon] = None
-                        os.remove(icon_fname)
 
             except KeyError, key:
                self.log("   no header: %s" % key)
@@ -291,3 +291,4 @@ class robot_simple(Robot):
 
       now = int(time.time())
       bookmark.test_time = str(now - start)
+      urllib.urlcleanup()