Fix OperationalError when resetting PKC
This commit is contained in:
parent
6629fb41e3
commit
f83a304419
1 changed files with 4 additions and 4 deletions
|
@ -361,7 +361,7 @@ def reset():
|
||||||
for row in rows:
|
for row in rows:
|
||||||
tablename = row[0]
|
tablename = row[0]
|
||||||
if tablename != "version":
|
if tablename != "version":
|
||||||
cursor.execute("DELETE FROM ?", (tablename,))
|
cursor.execute("DELETE FROM %s" % tablename)
|
||||||
connection.commit()
|
connection.commit()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ def reset():
|
||||||
for row in rows:
|
for row in rows:
|
||||||
tablename = row[0]
|
tablename = row[0]
|
||||||
if tablename != "version":
|
if tablename != "version":
|
||||||
cursor.execute("DELETE FROM ?", (tablename, ))
|
cursor.execute("DELETE FROM %s" % tablename)
|
||||||
connection.commit()
|
connection.commit()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ def reset():
|
||||||
for row in rows:
|
for row in rows:
|
||||||
tablename = row[0]
|
tablename = row[0]
|
||||||
if tablename != "version":
|
if tablename != "version":
|
||||||
cursor.execute("DELETE FROM ?", (tablename, ))
|
cursor.execute("DELETE FROM %s" % tablename)
|
||||||
cursor.execute('DROP table IF EXISTS plex')
|
cursor.execute('DROP table IF EXISTS plex')
|
||||||
cursor.execute('DROP table IF EXISTS view')
|
cursor.execute('DROP table IF EXISTS view')
|
||||||
connection.commit()
|
connection.commit()
|
||||||
|
@ -411,7 +411,7 @@ def reset():
|
||||||
for row in rows:
|
for row in rows:
|
||||||
tableName = row[0]
|
tableName = row[0]
|
||||||
if(tableName != "version"):
|
if(tableName != "version"):
|
||||||
cursor.execute("DELETE FROM ?", (tableName, ))
|
cursor.execute("DELETE FROM %s" % tableName)
|
||||||
connection.commit()
|
connection.commit()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue