IMAP.py calls Internaldate2epoch with bytes argument

The function Internaldate2epoch needs a bytes argument,
not an string, we need encode it:

imaplibutil.Internaldate2epoch(messagestr.encode('utf-8'))
This commit is contained in:
Rodolfo García Peñas (kix) 2020-08-31 18:11:58 +02:00
parent b6cec81090
commit 7980f7ff1a

View File

@ -304,7 +304,7 @@ class IMAPFolder(BaseFolder):
self.messagelist[uid] = self.msglist_item_initializer(uid)
flags = imaputil.flagsimap2maildir(options['FLAGS'])
keywords = imaputil.flagsimap2keywords(options['FLAGS'])
rtime = imaplibutil.Internaldate2epoch(messagestr)
rtime = imaplibutil.Internaldate2epoch(messagestr.encode('utf-8'))
self.messagelist[uid] = {'uid': uid, 'flags': flags, 'time': rtime,
'keywords': keywords}
self.ui.messagelistloaded(self.repository, self, self.getmessagecount())