1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

nmcli: check NMClient, NetworkManager availability (#38076)

This fix adds check for NMClient, NetworkManager availability
while using require_version API.

Fixes: #38042

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2018-04-04 15:28:38 +05:30 committed by ansibot
parent 980a130f2e
commit ac9dbdeb10

View file

@ -467,7 +467,7 @@ try:
from gi.repository import NetworkManager, NMClient
HAVE_NM_CLIENT = True
except ImportError:
except (ImportError, ValueError):
HAVE_NM_CLIENT = False
from ansible.module_utils.basic import AnsibleModule