Mercurial > p > roundup > code
diff roundup/mailgw.py @ 5912:7264b2e79a31
Fix mailgw IMAP message handling
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Wed, 09 Oct 2019 18:18:22 +0200 |
| parents | 611737bc7261 |
| children | a328f9e3307b |
line wrap: on
line diff
--- a/roundup/mailgw.py Wed Oct 09 08:28:17 2019 +0200 +++ b/roundup/mailgw.py Wed Oct 09 18:18:22 2019 +0200 @@ -1357,9 +1357,9 @@ # mark the message as deleted. server.store(str(i), '+FLAGS', r'(\Deleted)') - # process the message - s = io.BytesIO(data[0][1]) - s.seek(0) + # process the message, data[0][1] is of type 'bytes' for + # python3 and a string for python2. + s = data[0][1] self.handle_Message(message_from_bytes(s, RoundupMessage)) server.close() finally:
