Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix the version check when no database exists

  • Loading branch information...
commit c4767342d549859146e1cc97d5e8cbfd163b7c28 1 parent baa2068
@midgetspy authored
Showing with 11 additions and 3 deletions.
  1. +5 −2
  2. +6 −1 sickbeard/
@@ -263,8 +263,11 @@ def main():
sickbeard.CFG = ConfigObj(sickbeard.CONFIG_FILE)
if db.DBConnection().checkDBVersion() > MAX_DB_VERSION:
- print 'Your database version has been incremented past what this version of Sick Beard supports.'
- print 'Have you used other forks of Sick Beard with this same database file?'
+ print 'Your database version has been incremented'
+ print 'past what this version of Sick Beard supports.'
+ print
+ print 'If you have used other forks of SB which have'
+ print 'modified your database it may now be unusable.'
# Initialize the config and our threads
7 sickbeard/
@@ -55,7 +55,12 @@ def __init__(self, filename="sickbeard.db", suffix=None, row_type=None):
self.connection.row_factory = sqlite3.Row
def checkDBVersion(self):
- result ="SELECT db_version FROM db_version")
+ try:
+ result ="SELECT db_version FROM db_version")
+ except sqlite3.OperationalError, e:
+ if "no such table: db_version" in e.message:
+ return 0
if result:
return int(result[0]["db_version"])
Please sign in to comment.
Something went wrong with that request. Please try again.