mirror of
https://github.com/python/cpython
synced 2026-09-29 10:15:30 +03:00
Sending the auth info as string. Fix BytesWarning: str() on a bytes instance Exception on buildbot.
This commit is contained in:
parent
23df483cb6
commit
5626eec0c2
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue