summaryrefslogtreecommitdiff
path: root/boto/connection.py
diff options
context:
space:
mode:
authorNick Tarleton <nick@quixey.com>2011-04-02 11:37:55 -0700
committergarnaat <mitch@garnaat.com>2011-04-02 17:48:59 -0400
commit2dc32d7d861bb532e0bda20dbe64e8c4c8b9b1e3 (patch)
tree42e2d4f1418d2611a10e7643d4189cc4d38c89f8 /boto/connection.py
parent63bf4e8a6fb61bd83ded14d3c3796d502076ef23 (diff)
downloadboto-branch_master_python3k.tar.gz
fix base64.encode{bytes,string} Python 2 regressionbranch_master_python3k
Diffstat (limited to 'boto/connection.py')
-rw-r--r--boto/connection.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/boto/connection.py b/boto/connection.py
index a8fb6562..e6ae5187 100644
--- a/boto/connection.py
+++ b/boto/connection.py
@@ -64,11 +64,13 @@ try:
import http.client as httplib
import urllib.parse as urllib
unicode = str
+ base64_encodestring = base64.encodebytes
except ImportError:
# Python 2.x
import Queue
import httplib
import urllib
+ base64_encodestring = base64.encodestring
PORTS_BY_SECURITY = { True: 443, False: 80 }
@@ -409,7 +411,7 @@ class AWSAuthConnection(object):
return path
def get_proxy_auth_header(self):
- auth = base64.encodebytes(self.proxy_user + ':' + self.proxy_pass)
+ auth = base64_encodestring(self.proxy_user + ':' + self.proxy_pass)
return {'Proxy-Authorization': 'Basic %s' % auth}
def _mexe(self, method, path, data, headers, host=None, sender=None,