From 04a3c3ff5ac0c7c41317ac29355b4215391d0570 Mon Sep 17 00:00:00 2001 From: Garret Wassermann Date: Wed, 30 Aug 2017 10:48:16 -0400 Subject: [PATCH] Update decodestring to decodebytes for Py3 since string name was deprecated in py3.1 --- helpdesk/lib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/helpdesk/lib.py b/helpdesk/lib.py index befbacff..ae8d8944 100644 --- a/helpdesk/lib.py +++ b/helpdesk/lib.py @@ -11,13 +11,17 @@ import mimetypes import os try: + # Python 2 support from base64 import urlsafe_b64encode as b64encode except ImportError: - from base64 import encodestring as b64encode + # Python 3 support + from base64 import encodebytes as b64encode try: + # Python 2 support from base64 import urlsafe_b64decode as b64decode except ImportError: - from base64 import decodestring as b64decode + # Python 3 support + from base64 import decodebytes as b64decode from django.conf import settings from django.db.models import Q