diff --git a/awx/main/credential_plugins/conjur.py b/awx/main/credential_plugins/conjur.py index aaa8d8c2e3..0026bb330b 100644 --- a/awx/main/credential_plugins/conjur.py +++ b/awx/main/credential_plugins/conjur.py @@ -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