diff options
| author | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-04 17:49:13 (GMT) | 
|---|---|---|
| committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-04 17:49:13 (GMT) | 
| commit | fe2f4ecc14aefd236d2f39546976bcebe1ef29e5 (patch) | |
| tree | 14dec806ffec4a097109f6a8c7d83ddfdea7fd38 /Lib/urllib/request.py | |
| parent | 6aa8bc3442ff4be718e6c8bcd807a84b403c81c7 (diff) | |
| download | cpython-fe2f4ecc14aefd236d2f39546976bcebe1ef29e5.zip cpython-fe2f4ecc14aefd236d2f39546976bcebe1ef29e5.tar.gz cpython-fe2f4ecc14aefd236d2f39546976bcebe1ef29e5.tar.bz2 | |
Merged revisions 83729 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
  r83729 | senthil.kumaran | 2010-08-04 23:16:23 +0530 (Wed, 04 Aug 2010) | 3 lines
  Sending the auth info as string. Fix BytesWarning: str() on a bytes instance Exception on buildbot.
........
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 4522466..a26b763 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.encode()).strip() +            proxy_auth = base64.b64encode(proxy_passwd.encode()).decode('ascii')          else:              proxy_auth = None          if user_passwd:              import base64 -            auth = base64.b64encode(user_passwd.encode()).strip() +            auth = base64.b64encode(user_passwd.encode()).decode('ascii')          else:              auth = None          http_conn = connection_factory(host) | 
