Fix OperationalError when resetting PKC

This commit is contained in:
tomkat83 2017-05-12 12:52:27 +02:00
parent 6629fb41e3
commit f83a304419

View file

@ -361,7 +361,7 @@ def reset():
for row in rows:
tablename = row[0]
if tablename != "version":
cursor.execute("DELETE FROM ?", (tablename,))
cursor.execute("DELETE FROM %s" % tablename)
connection.commit()
cursor.close()
@ -374,7 +374,7 @@ def reset():
for row in rows:
tablename = row[0]
if tablename != "version":
cursor.execute("DELETE FROM ?", (tablename, ))
cursor.execute("DELETE FROM %s" % tablename)
connection.commit()
cursor.close()
@ -387,7 +387,7 @@ def reset():
for row in rows:
tablename = row[0]
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 view')
connection.commit()
@ -411,7 +411,7 @@ def reset():
for row in rows:
tableName = row[0]
if(tableName != "version"):
cursor.execute("DELETE FROM ?", (tableName, ))
cursor.execute("DELETE FROM %s" % tableName)
connection.commit()
cursor.close()