diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-01 17:55:50 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-01 17:55:50 (GMT) |
commit | afef78f832d0f2eab287f4ce889baf4d68a4fc63 (patch) | |
tree | c5f4a471e648990fbfdc042e993a6d5b5d8c75f2 /Lib/urllib/request.py | |
parent | f6df1ee171967b05186de1111810e184adbe5bfa (diff) | |
download | cpython-afef78f832d0f2eab287f4ce889baf4d68a4fc63.zip cpython-afef78f832d0f2eab287f4ce889baf4d68a4fc63.tar.gz cpython-afef78f832d0f2eab287f4ce889baf4d68a4fc63.tar.bz2 |
Merged revisions 83415 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83415 | senthil.kumaran | 2010-08-01 23:23:37 +0530 (Sun, 01 Aug 2010) | 3 lines
Fix Issue8123 - TypeError in urllib when trying to use HTTP authentication
........
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r-- | Lib/urllib/request.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 14ea0aa..4522466 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -1595,13 +1595,13 @@ class URLopener: if proxy_passwd: import base64 - proxy_auth = base64.b64encode(proxy_passwd).strip() + proxy_auth = base64.b64encode(proxy_passwd.encode()).strip() else: proxy_auth = None if user_passwd: import base64 - auth = base64.b64encode(user_passwd).strip() + auth = base64.b64encode(user_passwd.encode()).strip() else: auth = None http_conn = connection_factory(host) |