]> code.delx.au - offlineimap/commitdiff
IMAP.py: fixed cannot concatenate 'str' and 'list' in assert
authorFlorian Friesdorf <flow@mytum.de>
Sat, 7 Jul 2007 03:51:02 +0000 (04:51 +0100)
committerFlorian Friesdorf <flow@mytum.de>
Sat, 7 Jul 2007 03:51:02 +0000 (04:51 +0100)
r[1] is a list. In case it contains more than one 'str' they are concatenated
using '. '. In processmessagesflags the join is tested, for savemessagesflags I
assume that it is also needed.

offlineimap/folder/IMAP.py

index 155f5e1a58366e8d9763b3f4d7d7e68bff27ff5f..26a12fd6a801faff58d4cdb53c4a78aff10df233 100644 (file)
@@ -271,7 +271,7 @@ class IMAPFolder(BaseFolder):
                 return
             result = imapobj.uid('store', '%d' % uid, 'FLAGS',
                                  imaputil.flagsmaildir2imap(flags))
-            assert result[0] == 'OK', 'Error with store: ' + r[1]
+            assert result[0] == 'OK', 'Error with store: ' + '. '.join(r[1])
         finally:
             self.imapserver.releaseconnection(imapobj)
         result = result[1][0]
@@ -317,7 +317,7 @@ class IMAPFolder(BaseFolder):
                             imaputil.listjoin(uidlist),
                             operation + 'FLAGS',
                             imaputil.flagsmaildir2imap(flags))
-            assert r[0] == 'OK', 'Error with store: ' + r[1]
+            assert r[0] == 'OK', 'Error with store: ' + '. '.join(r[1])
             r = r[1]
         finally:
             self.imapserver.releaseconnection(imapobj)