fix the python3

This commit is contained in:
zodman 2017-09-27 12:50:51 -05:00
parent 03a57bdc5f
commit f06cbce07c

View File

@ -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]))