Skip to content

Commit 880c2e0

Browse files
committed
Now always passes a list to the query function to fix issue running it on 16.04
1 parent c6105e2 commit 880c2e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

feshiedb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def mark_smart_processed(self, id):
9393
if not self.connected():
9494
raise FeshieDbError()
9595
cursor = self.db.cursor()
96-
cursor.execute("UPDATE unprocessed_smart_data SET processed = 1 WHERE id = %s;", id)
96+
cursor.execute("UPDATE unprocessed_smart_data SET processed = 1 WHERE id = %s;", (id,))
9797
cursor.close()
9898
self.db.commit()
9999
self.logger.debug("Marked %s as processed", id)
@@ -103,7 +103,7 @@ def mark_smart_corrupt(self, id):
103103
if not self.connected():
104104
raise FeshieDbError()
105105
cursor = self.db.cursor()
106-
cursor.execute("UPDATE unprocessed_smart_data SET corrupt = 1 WHERE id = %s;", id)
106+
cursor.execute("UPDATE unprocessed_smart_data SET corrupt = 1 WHERE id = %s;", (id,))
107107
cursor.close()
108108
self.db.commit()
109109
self.logger.debug("Marked %s as corrupt", id)
@@ -113,7 +113,7 @@ def mark_processed(self, id):
113113
if not self.connected():
114114
raise FeshieDbError()
115115
cursor = self.db.cursor()
116-
cursor.execute("UPDATE unprocessed_data SET unpacked = 1 WHERE id = %s;", id)
116+
cursor.execute("UPDATE unprocessed_data SET unpacked = 1 WHERE id = %s;", (id,))
117117
cursor.close()
118118
self.db.commit()
119119
self.logger.debug("Marked %s as processed", id)
@@ -123,7 +123,7 @@ def mark_corrupt(self, id):
123123
if not self.connected():
124124
raise FeshieDbError()
125125
cursor = self.db.cursor()
126-
cursor.execute("UPDATE unprocessed_data SET corrupt = 1 WHERE id = %s;", id)
126+
cursor.execute("UPDATE unprocessed_data SET corrupt = 1 WHERE id = %s;", (id,))
127127
cursor.close()
128128
self.db.commit()
129129
self.logger.debug("Marked %s as corrupt", id)

0 commit comments

Comments
 (0)