test non-imglist db
This commit is contained in:
@@ -75,6 +75,15 @@ class DB:
|
||||
return
|
||||
db.close()
|
||||
except Exception:
|
||||
# Test if it's an image-list DB at all:
|
||||
try:
|
||||
db = sqlite3.connect(self.sqlfile, timeout=30)
|
||||
db.execute("SELECT 1 FROM data")
|
||||
db.execute("SELECT 1 FROM list")
|
||||
db.execute("SELECT 1 FROM files")
|
||||
except sqlite3.OperationalError:
|
||||
raise Exception("Database is not image-list DB")
|
||||
|
||||
# last version without config
|
||||
config_version = "0.0.6"
|
||||
self.migrated = True
|
||||
|
||||
Reference in New Issue
Block a user