Skip to content

Commit

Permalink
fix: support string type response.data (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
arithmetic1728 committed May 7, 2020
1 parent e115bae commit 9b7228e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions google/auth/impersonated_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def _make_iam_token_request(request, principal, headers, body):

response = request(url=iam_endpoint, method="POST", headers=headers, body=body)

# support both string and bytes type response.data
response_body = (
response.data.decode("utf-8")
if hasattr(response.data, "decode")
Expand Down

0 comments on commit 9b7228e

Please sign in to comment.