fix for weekly pull errors regarding data directory and sqldb

This commit is contained in:
evilhero 2012-09-26 16:53:08 -04:00
parent 9165e731fd
commit 15ed313ed5
1 changed files with 7 additions and 3 deletions

View File

@ -267,7 +267,9 @@ def pullit():
previssue = str(issue)
newtxtfile.close()
connection = sqlite3.connect("mylar.db")
mylardb = os.path.join(mylar.DATA_DIR, "mylar.db")
connection = sqlite3.connect(str(mylardb))
cursor = connection.cursor()
cursor.executescript('drop table if exists weekly;')
@ -295,7 +297,7 @@ def pullit():
connection.commit()
connection.close()
#let's delete the files
pullpath = str(mylar.PROG_DIR) + "/cache/"
pullpath = str(mylar.CACHE_DIR) + "/"
os.remove( str(pullpath) + "Clean-newreleases.txt" )
os.remove( str(pullpath) + "newreleases.txt" )
pullitcheck()
@ -326,7 +328,9 @@ def pullitcheck():
b_list = []
comicid = []
con = sqlite3.connect("mylar.db")
mylardb = os.path.join(mylar.DATA_DIR, "mylar.db")
con = sqlite3.connect(str(mylardb))
with con: