mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
change except to get response instead of raise error
This commit is contained in:
parent
4470b80059
commit
d8e7c59fe8
@ -73,7 +73,7 @@ def conjur_backend(**kwargs):
|
||||
except requests.exceptions.ConnectionError:
|
||||
resp = requests.post(urljoin(url, '/'.join(['api', 'authn', account, username, 'authenticate'])), **auth_kwargs)
|
||||
except:
|
||||
raise
|
||||
resp = requests.post(urljoin(url, '/'.join(['api', 'authn', account, username, 'authenticate'])), **auth_kwargs)
|
||||
raise_for_status(resp)
|
||||
token = resp.content.decode('utf-8')
|
||||
|
||||
@ -97,7 +97,7 @@ def conjur_backend(**kwargs):
|
||||
except requests.exceptions.ConnectionError:
|
||||
resp = requests.get(path_conjurcloud, timeout=30, **lookup_kwargs)
|
||||
except:
|
||||
raise
|
||||
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