diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-04 17:46:23 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-04 17:46:23 (GMT) |
commit | 5626eec0c2f62999967eff0ab6aa8ad329e8571b (patch) | |
tree | d996910ca224f0433aaf09edda634e79dd6a63ec /Lib/urllib/request.py | |
parent | 23df483cb67e5cc0d82f70105e18060d73971a82 (diff) | |
download | cpython-5626eec0c2f62999967eff0ab6aa8ad329e8571b.zip cpython-5626eec0c2f62999967eff0ab6aa8ad329e8571b.tar.gz cpython-5626eec0c2f62999967eff0ab6aa8ad329e8571b.tar.bz2 |
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 24a4797..012814c 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -1591,13 +1591,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) |