[PATCHv2] LocalStatusSQLite: Fix bug when deleting messages
Sebastian Spaeth
Sebastian at SSpaeth.de
Sat May 7 19:28:17 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>
---
DAMMIT, Sorry I did not include all changes in v1. Here it is again with
the correct version. Ignore v1 from a few minutes ago. I am now going to
take a brief offlineimap break or I am going crazy :)
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..f470599 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=?', (uid, ))
--
1.7.4.1
More information about the OfflineIMAP-project
mailing list