mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
consul_acl: fix broken import (#33729)
This commit is contained in:
parent
87c75b19dd
commit
85871da03d
2 changed files with 9 additions and 2 deletions
|
@ -175,8 +175,13 @@ try:
|
|||
except ImportError:
|
||||
pyhcl_installed = False
|
||||
|
||||
try:
|
||||
from requests.exceptions import ConnectionError
|
||||
has_requests = True
|
||||
except ImportError:
|
||||
has_requests = False
|
||||
|
||||
from collections import defaultdict
|
||||
from requests.exceptions import ConnectionError
|
||||
from ansible.module_utils.basic import to_text, AnsibleModule
|
||||
|
||||
|
||||
|
@ -607,6 +612,9 @@ def check_dependencies():
|
|||
raise ImportError("pyhcl required for this module. "
|
||||
"See: https://pypi.python.org/pypi/pyhcl")
|
||||
|
||||
if not has_requests:
|
||||
raise ImportError("requests required for this module. See https://pypi.python.org/pypi/requests")
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
|
|
|
@ -11,7 +11,6 @@ lib/ansible/modules/cloud/webfaction/webfaction_db.py
|
|||
lib/ansible/modules/cloud/webfaction/webfaction_domain.py
|
||||
lib/ansible/modules/cloud/webfaction/webfaction_mailbox.py
|
||||
lib/ansible/modules/cloud/webfaction/webfaction_site.py
|
||||
lib/ansible/modules/clustering/consul_acl.py
|
||||
lib/ansible/modules/network/cloudengine/ce_file_copy.py
|
||||
lib/ansible/modules/network/ios/ios_static_route.py
|
||||
lib/ansible/modules/network/lenovo/cnos_backup.py
|
||||
|
|
Loading…
Reference in a new issue