From d8e7c59fe802dbd3493892393442403ee96df08c Mon Sep 17 00:00:00 2001 From: Joe Garcia Date: Fri, 20 Jan 2023 11:40:51 -0500 Subject: [PATCH] change except to get response instead of raise error --- awx/main/credential_plugins/conjur.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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