[Python-modules-commits] [python-social-auth] 20/89: Fixing ImportError: cannot import name ‘urlencode’ in Python3

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


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

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

commit bf1d48c8cc0e71d9aec89095d55b685e9c4713ca
Author: Mishbah Razzaque <mishbah at jp74.com>
Date:   Tue Jan 26 17:04:19 2016 +0000

    Fixing ImportError: cannot import name ‘urlencode’ in Python3
---
 social/backends/salesforce.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/social/backends/salesforce.py b/social/backends/salesforce.py
index ccaca63..066f072 100644
--- a/social/backends/salesforce.py
+++ b/social/backends/salesforce.py
@@ -1,6 +1,10 @@
-from urllib import urlencode
 from social.backends.oauth import BaseOAuth2
 
+try:
+    from urllib import urlencode
+except ImportError:
+    from urllib.parse import urlencode
+
 
 class SalesforceOAuth2(BaseOAuth2):
     """Salesforce OAuth2 authentication backend"""

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