Sending the auth info as string. Fix BytesWarning: str() on a bytes instance Exception on buildbot.

This commit is contained in:
Senthil Kumaran 2010-08-04 17:46:23 +00:00
parent 23df483cb6
commit 5626eec0c2
1 changed files with 2 additions and 2 deletions

View File

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