Fix for DB issues on new installs relating to database version checks.

This commit is contained in:
echel0n 2014-06-22 18:24:55 -07:00
parent b0149cc65d
commit 0599a89565

View file

@ -105,10 +105,10 @@ class DBConnection(object):
result = None
try:
result = self.select("SELECT db_version FROM db_version")
except sqlite3.OperationalError, e:
if "no such table: db_version" in e.args[0]:
return 0
if self.hasTable('db_version'):
result = self.select("SELECT db_version FROM db_version")
except:
pass
if result:
return int(result[0]["db_version"])