Source

vpackager / src / scripts / vpackager

Diff from to

File src/scripts/vpackager

 from vpackager import bot
 from vpackager import vpackager as vp
 from vpackager import dbutils
+from vpackager import preferences
 import sys
+import os
 
 def RunBot():
     """run vpackager in bot mode"""
-    db = dbutils.dbase()
+    dbpath = preferences.VPConf().GetSetting('database_home')
+    db = dbutils.dbase(os.path.join(dbpath, 'vpackager.db'))
+    try:
+	    db.CreateTables()
+    except:
+	    # Tables already exist
+	    pass
     w = bot.Gui(dbase_model = db)
     return w