Skip to content
This repository
Browse code

Bug fix for requests transport. Resolves #16

  • Loading branch information...
commit 7bb4674776267ae5e7d300b5c23d6106262c1073 1 parent 0d2b154
Kevin McDonald authored December 08, 2012

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  object_storage/transport/requestsconn.py
6  object_storage/transport/requestsconn.py
@@ -82,6 +82,10 @@ def __init__(self, username, api_key, auth_token=None, *args, **kwargs):
82 82
         if self.auth_token:
83 83
             self.authenticated = True
84 84
 
  85
+    @property
  86
+    def auth_headers(self):
  87
+        return {'X-Auth-Token': self.auth_token}
  88
+
85 89
     def authenticate(self):
86 90
         """ Does authentication """
87 91
         headers = {'X-Storage-User': self.username,
@@ -101,9 +105,7 @@ def authenticate(self):
101 105
 
102 106
         self.auth_token = response.headers['x-auth-token']
103 107
         self.storage_url = self.get_storage_url(storage_options)
104  
-        self.auth_headers = {'X-Auth-Token': self.auth_token}
105 108
         if not self.storage_url:
106 109
             self.storage_url = response.headers['x-storage-url']
107  
-            raise errors.StorageURLNotFound("Could not find defined storage URL. Using default.")
108 110
         if not self.auth_token or not self.storage_url:
109 111
             raise errors.AuthenticationError('Invalid Authentication Response')

0 notes on commit 7bb4674

Please sign in to comment.
Something went wrong with that request. Please try again.