Skip to content

Commit

Permalink
type('') to str
Browse files Browse the repository at this point in the history
  • Loading branch information
niteshCoditas committed Apr 2, 2016
1 parent 3d3b064 commit c22b92a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_authorization_header(request):
Hide some test client ickyness where the header can be unicode.
"""
auth = request.META.get('HTTP_AUTHORIZATION', b'')
if isinstance(auth, type('')):
if isinstance(auth, str):
# Work around django test client oddness
auth = auth.encode(HTTP_HEADER_ENCODING)
return auth
Expand Down

0 comments on commit c22b92a

Please sign in to comment.