forked from extern/django-helpdesk
Update decodestring to decodebytes for Py3 since string name was deprecated in py3.1
This commit is contained in:
parent
043a40682f
commit
04a3c3ff5a
@ -11,13 +11,17 @@ import mimetypes
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# Python 2 support
|
||||||
from base64 import urlsafe_b64encode as b64encode
|
from base64 import urlsafe_b64encode as b64encode
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from base64 import encodestring as b64encode
|
# Python 3 support
|
||||||
|
from base64 import encodebytes as b64encode
|
||||||
try:
|
try:
|
||||||
|
# Python 2 support
|
||||||
from base64 import urlsafe_b64decode as b64decode
|
from base64 import urlsafe_b64decode as b64decode
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from base64 import decodestring as b64decode
|
# Python 3 support
|
||||||
|
from base64 import decodebytes as b64decode
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
Loading…
Reference in New Issue
Block a user