Skip to content

Commit 0e39cb6

Browse files
committed
cleanup on six.string_types
1 parent 36353eb commit 0e39cb6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rest_framework/authentication.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"""
44
from __future__ import unicode_literals
55

6-
import base64, six
6+
import base64
7+
from six import string_types
78

89
from django.contrib.auth import authenticate, get_user_model
910
from django.middleware.csrf import CsrfViewMiddleware
@@ -19,7 +20,7 @@ def get_authorization_header(request):
1920
Hide some test client ickyness where the header can be unicode.
2021
"""
2122
auth = request.META.get('HTTP_AUTHORIZATION', b'')
22-
if isinstance(auth, six.string_types):
23+
if isinstance(auth, string_types):
2324
# Work around django test client oddness
2425
auth = auth.encode(HTTP_HEADER_ENCODING)
2526
return auth

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy