Don't call set().sort()

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@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-08-22 14:58:42 +02:00 committed by Nicolas Sebrecht
parent a6480d4959
commit dcc50efc4f

View File

@ -231,8 +231,7 @@ class LocalStatusSQLiteFolder(LocalStatusFolder):
def savemessageflags(self, uid, flags): def savemessageflags(self, uid, flags):
self.messagelist[uid] = {'uid': uid, 'flags': flags} self.messagelist[uid] = {'uid': uid, 'flags': flags}
flags.sort() flags = ''.join(sorted(flags))
flags = ''.join(flags)
self.sql_write('UPDATE status SET flags=? WHERE id=?',(flags,uid)) self.sql_write('UPDATE status SET flags=? WHERE id=?',(flags,uid))
def deletemessages(self, uidlist): def deletemessages(self, uidlist):