summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r--Lib/urllib/request.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 14ea0aa..4522466 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).strip()
+ proxy_auth = base64.b64encode(proxy_passwd.encode()).strip()
else:
proxy_auth = None
if user_passwd:
import base64
- auth = base64.b64encode(user_passwd).strip()
+ auth = base64.b64encode(user_passwd.encode()).strip()
else:
auth = None
http_conn = connection_factory(host)