[Python-checkins] r83729 - python/branches/py3k/Lib/urllib/request.py
senthil.kumaran
python-checkins at python.org
Wed Aug 4 19:46:23 CEST 2010
Author: senthil.kumaran
Date: Wed Aug 4 19:46:23 2010
New Revision: 83729
Log:
Sending the auth info as string. Fix BytesWarning: str() on a bytes instance Exception on buildbot.
Modified:
python/branches/py3k/Lib/urllib/request.py
Modified: python/branches/py3k/Lib/urllib/request.py
==============================================================================
--- python/branches/py3k/Lib/urllib/request.py (original)
+++ python/branches/py3k/Lib/urllib/request.py Wed Aug 4 19:46:23 2010
@@ -1591,13 +1591,13 @@
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)
More information about the Python-checkins
mailing list