from urllib2 import ProxyHandler
from threading import Thread
from os.path import isfile, isdir, exists
-from os import mkdir, remove, stat
+from os import mkdir, remove, stat, environ
-CONFIGDIR = "/home/user/.feedingit/"
+CONFIGDIR = environ.get("HOME", "/home/user") + "/.feedingit"
+#CONFIGDIR = "/home/user/.feedingit/"
updatingFeeds = []
#commands = [("addFeed","httpwww"), ("openFeed", "xxxx"), ("openArticle", ("feedid","artid"))]
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()