Skip to content

Instantly share code, notes, and snippets.

@justmedude
Created April 16, 2012 22:11
Show Gist options
  • Save justmedude/2402014 to your computer and use it in GitHub Desktop.
Save justmedude/2402014 to your computer and use it in GitHub Desktop.
fix for httplib2conn.py
diff --git a/object_storage/transport/httplib2conn.py b/object_storage/transport/httplib2conn.py
index faad551..b8f15b0 100755
--- a/object_storage/transport/httplib2conn.py
+++ b/object_storage/transport/httplib2conn.py
@@ -28,7 +28,8 @@ class AuthenticatedConnection(BaseAuthenticatedConnection):
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 @@ class Authentication(BaseAuthentication):
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment