[PATCH] Don't call set().sort()

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Aug 22 12:58:42 UTC 2011


as that method doesn't exist on sets. Rather call the inbuilt
sorted(flags). This fixes Exceptions being thrown when using the sqlite
backend.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 offlineimap/folder/LocalStatusSQLite.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/offlineimap/folder/LocalStatusSQLite.py b/offlineimap/folder/LocalStatusSQLite.py
index 11791d0..eae5d0c 100644
--- a/offlineimap/folder/LocalStatusSQLite.py
+++ b/offlineimap/folder/LocalStatusSQLite.py
@@ -231,8 +231,7 @@ class LocalStatusSQLiteFolder(LocalStatusFolder):
 
     def savemessageflags(self, uid, flags):
         self.messagelist[uid] = {'uid': uid, 'flags': flags}
-        flags.sort()
-        flags = ''.join(flags)
+        flags = ''.join(sorted(flags))
         self.sql_write('UPDATE status SET flags=? WHERE id=?',(flags,uid))
 
     def deletemessages(self, uidlist):
-- 
1.7.4.1




More information about the OfflineIMAP-project mailing list