mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 09:48:51 -03:30
Fix API Lint Failure - remove bare excepts
This commit is contained in:
@@ -72,8 +72,6 @@ def conjur_backend(**kwargs):
|
|||||||
resp = requests.post(urljoin(url, '/'.join(['authn', account, username, 'authenticate'])), **auth_kwargs)
|
resp = requests.post(urljoin(url, '/'.join(['authn', account, username, 'authenticate'])), **auth_kwargs)
|
||||||
except requests.exceptions.ConnectionError:
|
except requests.exceptions.ConnectionError:
|
||||||
resp = requests.post(urljoin(url, '/'.join(['api', 'authn', account, username, 'authenticate'])), **auth_kwargs)
|
resp = requests.post(urljoin(url, '/'.join(['api', 'authn', account, username, 'authenticate'])), **auth_kwargs)
|
||||||
except:
|
|
||||||
resp = requests.post(urljoin(url, '/'.join(['api', 'authn', account, username, 'authenticate'])), **auth_kwargs)
|
|
||||||
raise_for_status(resp)
|
raise_for_status(resp)
|
||||||
token = resp.content.decode('utf-8')
|
token = resp.content.decode('utf-8')
|
||||||
|
|
||||||
@@ -96,8 +94,6 @@ def conjur_backend(**kwargs):
|
|||||||
resp = requests.get(path, timeout=30, **lookup_kwargs)
|
resp = requests.get(path, timeout=30, **lookup_kwargs)
|
||||||
except requests.exceptions.ConnectionError:
|
except requests.exceptions.ConnectionError:
|
||||||
resp = requests.get(path_conjurcloud, timeout=30, **lookup_kwargs)
|
resp = requests.get(path_conjurcloud, timeout=30, **lookup_kwargs)
|
||||||
except:
|
|
||||||
resp = requests.get(path_conjurcloud, timeout=30, **lookup_kwargs)
|
|
||||||
raise_for_status(resp)
|
raise_for_status(resp)
|
||||||
return resp.text
|
return resp.text
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user