[PATCH] LocalStatusSQLite: Fix bug when deleting messages
Sebastian Spaeth
Sebastian at SSpaeth.de
Sat May 7 19:23:30 BST 2011
The syntax was not right, and deleting messages from the LocalStatus
failed. (We passed in the full list of uids and we need to pass in one
uid at a time (as a tuple). Deleting messages works now.
Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
Already found a bug with the LocalStatusSQLite. I kept a remnant from a
previous version that I should have updated. Apply this on top of
current next and all is well...
Don't be afraid that I will continue to crank out patches at this pace.
Next week will be very quiet from me. :-)
offlineimap/folder/LocalStatusSQLite.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/offlineimap/folder/LocalStatusSQLite.py b/offlineimap/folder/LocalStatusSQLite.py
index 63452f8..35f7d71 100644
--- a/offlineimap/folder/LocalStatusSQLite.py
+++ b/offlineimap/folder/LocalStatusSQLite.py
@@ -238,5 +238,5 @@ class LocalStatusSQLiteFolder(LocalStatusFolder):
return
for uid in uidlist:
del(self.messagelist[uid])
- self.sql_write('DELETE FROM status WHERE id=?',
- uidlist)
+ #TODO: we want a way to do executemany(.., uidlist) to delete all
+ self.sql_write('DELETE FROM status WHERE id=?', (str(uid), ))
--
1.7.4.1
More information about the OfflineIMAP-project
mailing list