mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Fixes ansible/awx #13527
This commit is contained in:
parent
32f7295f44
commit
049a158638
@ -70,7 +70,8 @@ def conjur_backend(**kwargs):
|
||||
auth_kwargs['verify'] = cert
|
||||
try:
|
||||
resp = requests.post(urljoin(url, '/'.join(['authn', account, username, 'authenticate'])), **auth_kwargs)
|
||||
except requests.exceptions.ConnectionError:
|
||||
resp.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
resp = requests.post(urljoin(url, '/'.join(['api', 'authn', account, username, 'authenticate'])), **auth_kwargs)
|
||||
raise_for_status(resp)
|
||||
token = resp.content.decode('utf-8')
|
||||
@ -92,7 +93,8 @@ def conjur_backend(**kwargs):
|
||||
lookup_kwargs['verify'] = cert
|
||||
try:
|
||||
resp = requests.get(path, timeout=30, **lookup_kwargs)
|
||||
except requests.exceptions.ConnectionError:
|
||||
resp.raise_for_status()
|
||||
except requests.exceptions.HTTPError:
|
||||
resp = requests.get(path_conjurcloud, timeout=30, **lookup_kwargs)
|
||||
raise_for_status(resp)
|
||||
return resp.text
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user