summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index e01f421..90f7aa0 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -302,13 +302,13 @@ class URLopener:
if proxy_passwd:
import base64
- proxy_auth = base64.encodestring(proxy_passwd).strip()
+ proxy_auth = base64.b64encode(proxy_passwd).strip()
else:
proxy_auth = None
if user_passwd:
import base64
- auth = base64.encodestring(user_passwd).strip()
+ auth = base64.b64encode(user_passwd).strip()
else:
auth = None
h = httplib.HTTP(host)
@@ -387,12 +387,12 @@ class URLopener:
if not host: raise IOError, ('https error', 'no host given')
if proxy_passwd:
import base64
- proxy_auth = base64.encodestring(proxy_passwd).strip()
+ proxy_auth = base64.b64encode(proxy_passwd).strip()
else:
proxy_auth = None
if user_passwd:
import base64
- auth = base64.encodestring(user_passwd).strip()
+ auth = base64.b64encode(user_passwd).strip()
else:
auth = None
h = httplib.HTTPS(host, 0,