Skip to content

Commit e0cb7b5

Browse files
committed
Fix mailgw IMAP message handling
1 parent 152c3d1 commit e0cb7b5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ Fixed:
184184
- issue2551013: Reversed sorting in hyperdb property wrapper object's
185185
sorted() method. Patch by David Sowder, application and doc change
186186
by John Rouillard.
187+
- issue2551066: IMAP mail handling wasn't working and produced a
188+
traceback.
187189

188190
2018-07-13 1.6.0
189191

roundup/mailgw.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,9 +1357,9 @@ def do_imap(self, server, user='', password='', mailbox='', ssl=0,
13571357
# mark the message as deleted.
13581358
server.store(str(i), '+FLAGS', r'(\Deleted)')
13591359

1360-
# process the message
1361-
s = io.BytesIO(data[0][1])
1362-
s.seek(0)
1360+
# process the message, data[0][1] is of type 'bytes' for
1361+
# python3 and a string for python2.
1362+
s = data[0][1]
13631363
self.handle_Message(message_from_bytes(s, RoundupMessage))
13641364
server.close()
13651365
finally:

0 commit comments

Comments
 (0)