Call remove, not os.remove.
authorNeal H. Walfield <neal@walfield.org>
Sun, 17 Jul 2011 22:07:04 +0000 (00:07 +0200)
committerNeal H. Walfield <neal@walfield.org>
Sun, 17 Jul 2011 22:07:04 +0000 (00:07 +0200)
src/rss_sqlite.py

index f317862..64aef0a 100644 (file)
@@ -353,9 +353,9 @@ class Feed:
         contentLink = self.db.execute("SELECT contentLink FROM feed WHERE id=?;", (id,)).fetchone()[0]
         if contentLink:
             try:
-                os.remove(contentLink)
-            except:
-                print "File not found for deletion: %s" % contentLink
+                remove(contentLink)
+            except OSError, exception:
+                print "Deleting %s: %s" % (contentLink, str (exception))
         self.db.execute("DELETE FROM feed WHERE id=?;", (id,) )
         self.db.execute("DELETE FROM images WHERE id=?;", (id,) )
         self.db.commit()