[Python-modules-commits] [python-social-auth] 34/61: Fix #703

Wolfgang Borgert debacle at moszumanska.debian.org
Sat Dec 24 15:14:05 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 e4072e0b814c20ed55a32e4bcca7128ac0a6bf3a
Author: khamaileon <khamaileon at users.noreply.github.com>
Date:   Wed Aug 5 13:44:49 2015 +0200

    Fix #703
---
 social/backends/spotify.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/social/backends/spotify.py b/social/backends/spotify.py
index 3074a45..e8ab88e 100644
--- a/social/backends/spotify.py
+++ b/social/backends/spotify.py
@@ -21,10 +21,10 @@ class SpotifyOAuth2(BaseOAuth2):
     ]
 
     def auth_headers(self):
+        auth_str = '{0}:{1}'.format(*self.get_key_and_secret())
+        b64_auth_str = base64.urlsafe_b64encode(auth_str.encode()).decode()
         return {
-            'Authorization': 'Basic {0}'.format(base64.urlsafe_b64encode(
-                ('{0}:{1}'.format(*self.get_key_and_secret()).encode())
-            ))
+            'Authorization': 'Basic {0}'.format(b64_auth_str)
         }
 
     def get_user_details(self, response):

-- 
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