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