[Python-modules-commits] [python-social-auth] 16/61: text -> content solves "is not JSON serializable"

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:14:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to tag v0.2.13
in repository python-social-auth.

commit 3e670769d99b6c7484d07e48bf16dbd480d4e968
Author: Jordan Reiter <jordanreiter at gmail.com>
Date:   Thu Jul 16 14:02:20 2015 -0400

    text -> content solves "is not JSON serializable"
    
    Right now when you use .content, the token is bytes, not text, and so you run into an error when saving it to the session. Similar error in issue #139.
---
 social/backends/linkedin.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/social/backends/linkedin.py b/social/backends/linkedin.py
index 8180a66..739e181 100644
--- a/social/backends/linkedin.py
+++ b/social/backends/linkedin.py
@@ -68,7 +68,7 @@ class LinkedinOAuth(BaseLinkedinAuth, BaseOAuth1):
             scope = '?scope=' + self.SCOPE_SEPARATOR.join(scope)
         return self.request(self.REQUEST_TOKEN_URL + scope,
                             params=self.request_token_extra_arguments(),
-                            auth=self.oauth_auth()).content
+                            auth=self.oauth_auth()).text
 
 
 class LinkedinOAuth2(BaseLinkedinAuth, BaseOAuth2):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git



More information about the Python-modules-commits mailing list