From 31887504fd50fc117d75aff16831b2a0edf7767b Mon Sep 17 00:00:00 2001 From: Garret Wassermann Date: Wed, 7 Feb 2018 02:46:13 -0500 Subject: [PATCH] seperate out text for better logging of error --- helpdesk/management/commands/get_email.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 6be78d1a..be59be3c 100755 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -179,7 +179,8 @@ def process_queue(q, logger): 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') + popmsg = server.retr(msgNum)[1] + full_message = encoding.force_text(b"\n".join(popmsg), errors='replace') ticket = ticket_from_message(message=full_message, queue=q, logger=logger) if ticket: