From 3e7899a9dc2531f45c0f0cf35a30974dba72b403 Mon Sep 17 00:00:00 2001 From: Florian Friesdorf Date: Sat, 7 Jul 2007 04:51:02 +0100 Subject: [PATCH] IMAP.py: fixed cannot concatenate 'str' and 'list' in assert 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index 155f5e1..26a12fd 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -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)