mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-21 17:13:42 +00:00
Fix for DB issues on new installs relating to database version checks.
This commit is contained in:
parent
b0149cc65d
commit
0599a89565
1 changed files with 4 additions and 4 deletions
|
@ -105,10 +105,10 @@ class DBConnection(object):
|
||||||
result = None
|
result = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = self.select("SELECT db_version FROM db_version")
|
if self.hasTable('db_version'):
|
||||||
except sqlite3.OperationalError, e:
|
result = self.select("SELECT db_version FROM db_version")
|
||||||
if "no such table: db_version" in e.args[0]:
|
except:
|
||||||
return 0
|
pass
|
||||||
|
|
||||||
if result:
|
if result:
|
||||||
return int(result[0]["db_version"])
|
return int(result[0]["db_version"])
|
||||||
|
|
Loading…
Reference in a new issue