Gmail.py Get the server response right
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) <kix@kix.es>
This commit is contained in:
		| @@ -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: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Rodolfo García Peñas (kix)
					Rodolfo García Peñas (kix)