mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 17:04:01 +01:00
update requests_oauthlib
This commit is contained in:
@@ -8,8 +8,6 @@ MissingTokenError.
|
||||
|
||||
from json import loads, dumps
|
||||
|
||||
from oauthlib.common import to_unicode
|
||||
|
||||
|
||||
def fitbit_compliance_fix(session):
|
||||
def _missing_error(r):
|
||||
@@ -17,7 +15,7 @@ def fitbit_compliance_fix(session):
|
||||
if "errors" in token:
|
||||
# Set the error to the first one we have
|
||||
token["error"] = token["errors"][0]["errorType"]
|
||||
r._content = to_unicode(dumps(token)).encode("UTF-8")
|
||||
r._content = dumps(token).encode()
|
||||
return r
|
||||
|
||||
session.register_compliance_hook("access_token_response", _missing_error)
|
||||
|
||||
Reference in New Issue
Block a user