From b24687fcd60dce4d6eb9cc07d2bb207eaa9893d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 2 Sep 2020 10:00:20 +0200 Subject: [PATCH] Gmail.py Get the server response right MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now, the server response is in a list of strings. We need the second string, so we need read the [1]. Previously, was a list of tuples, so, we used [0][1]. This patch is like the patch IMAP.py Get the server response right, but now for Gmail. Signed-off-by: Rodolfo García Peñas (kix) --- offlineimap/folder/Gmail.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/offlineimap/folder/Gmail.py b/offlineimap/folder/Gmail.py index 308f68d..a8f2a9f 100644 --- a/offlineimap/folder/Gmail.py +++ b/offlineimap/folder/Gmail.py @@ -71,10 +71,10 @@ class GmailFolder(IMAPFolder): data = self._fetch_from_imap(str(uid), self.retrycount) # data looks now e.g. - # [('320 (X-GM-LABELS (...) UID 17061 BODY[] {2565}','msgbody....')] - # we only asked for one message, and that msg is in data[0]. - # msbody is in [0][1]. - body = data[0][1].replace("\r\n", "\n") + # ['320 (X-GM-LABELS (...) UID 17061 BODY[] {2565}','msgbody....'] + # we only asked for one message, and that msg is in data[1]. + # msbody is in [1]. + body = data[1].replace("\r\n", "\n") # Embed the labels into the message headers if self.synclabels: