Patch for #582, POP3 processing error on py3

This commit is contained in:
Garret Wassermann 2018-02-07 02:14:28 -05:00
parent a957e74853
commit a10c662207

View File

@ -176,7 +176,10 @@ def process_queue(q, logger):
msgNum = msg.split(" ")[0]
logger.info("Processing message %s" % msgNum)
if six.PY2:
full_message = encoding.force_text("\n".join(server.retr(msgNum)[1]), errors='replace')
else:
full_message = encoding.force_text(b"\n".join(server.retr(msgNum)[1]), errors='replace')
ticket = ticket_from_message(message=full_message, queue=q, logger=logger)
if ticket: