Permalink
Browse files

Added a change that will behave better with older versions of httplib2.

  • Loading branch information...
1 parent 097883d commit 43f9c5094d217f013b2c648433459ce7bc7e3761 @sudorandom sudorandom committed Apr 20, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 object_storage/transport/httplib2conn.py
@@ -28,7 +28,8 @@ def __init__(self, auth, debug=False, **kwargs):
httplib2.debuglevel=4
self.token = None
self.storage_url = None
- self.http = httplib2.Http(disable_ssl_certificate_validation=True)
+ self.http = httplib2.Http()
+ self.http.disable_ssl_certificate_validation = True
self.auth = auth
if not self.auth.authenticated:
self.auth.authenticate()
@@ -88,7 +89,8 @@ def authenticate(self):
headers = {'X-Storage-User': self.username,
'X-Storage-Pass': self.api_key,
'Content-Length': '0'}
- http = httplib2.Http(disable_ssl_certificate_validation=True)
+ http = httplib2.Http()
+ http.disable_ssl_certificate_validation = True
res, content = http.request(self.auth_url, 'GET', headers=headers)
response = Response()
response.headers = res

0 comments on commit 43f9c50

Please sign in to comment.