From f06cbce07c4ed161e6b75c501f066295fd5c391a Mon Sep 17 00:00:00 2001 From: zodman Date: Wed, 27 Sep 2017 12:50:51 -0500 Subject: [PATCH] fix the python3 --- helpdesk/management/commands/get_email.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 5b2c2036..40c25b1f 100755 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -347,7 +347,7 @@ def ticket_from_message(message, queue, logger): try: logger.debug("Try to base64 decode the attachment payload") payloadToWrite = base64.decodestring(payload) - except binascii.Error, TypeError: + except (binascii.Error, TypeError): logger.debug("Payload was not base64 encoded, using raw bytes") payloadToWrite = payload files.append(SimpleUploadedFile(name, part.get_payload(decode=True), mimetypes.guess_type(name)[0]))