This repository was archived by the owner on Dec 5, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -234,22 +234,22 @@ def authenticate(self):
234
234
tmp_follow_all_redirects = self .follow_all_redirects
235
235
self .follow_all_redirects = True
236
236
try :
237
- resp , body = self ._cs_request (token_url , "POST" ,
238
- body = json .dumps (body ),
239
- content_type = "application/json" )
237
+ resp , resp_body = self ._cs_request (token_url , "POST" ,
238
+ body = json .dumps (body ),
239
+ content_type = "application/json" )
240
240
finally :
241
241
self .follow_all_redirects = tmp_follow_all_redirects
242
242
status_code = self .get_status_code (resp )
243
243
if status_code != 200 :
244
- raise exceptions .Unauthorized (message = body )
245
- if body :
244
+ raise exceptions .Unauthorized (message = resp_body )
245
+ if resp_body :
246
246
try :
247
- body = json .loads (body )
247
+ resp_body = json .loads (resp_body )
248
248
except ValueError :
249
249
pass
250
250
else :
251
- body = None
252
- self ._extract_service_catalog (body )
251
+ resp_body = None
252
+ self ._extract_service_catalog (resp_body )
253
253
254
254
def _get_endpoint_url (self ):
255
255
url = self .auth_url + '/tokens/%s/endpoints' % self .auth_token
You can’t perform that action at this time.
0 commit comments