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>
pull/38266/head
Abhijeet Kasurde 7 years ago committed by ansibot
parent 980a130f2e
commit ac9dbdeb10

@ -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

Loading…
Cancel
Save