mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
properly fail_json when we don't have ssl on a non-redhat distro
This commit is contained in:
parent
4b4168bc92
commit
28c933ce5e
1 changed files with 2 additions and 0 deletions
|
@ -764,6 +764,8 @@ def fetch_url(module, url, data=None, headers=None, method=None,
|
|||
distribution = get_distribution()
|
||||
if distribution.lower() == 'redhat':
|
||||
module.fail_json(msg='%s. You can also install python-ssl from EPEL' % str(e))
|
||||
else:
|
||||
module.fail_json(msg='%s' % str(e))
|
||||
except (ConnectionError, ValueError), e:
|
||||
module.fail_json(msg=str(e))
|
||||
except urllib2.HTTPError, e:
|
||||
|
|
Loading…
Reference in a new issue