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:
parent
980a130f2e
commit
ac9dbdeb10
1 changed files with 1 additions and 1 deletions
|
@ -467,7 +467,7 @@ try:
|
||||||
|
|
||||||
from gi.repository import NetworkManager, NMClient
|
from gi.repository import NetworkManager, NMClient
|
||||||
HAVE_NM_CLIENT = True
|
HAVE_NM_CLIENT = True
|
||||||
except ImportError:
|
except (ImportError, ValueError):
|
||||||
HAVE_NM_CLIENT = False
|
HAVE_NM_CLIENT = False
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
|
Loading…
Reference in a new issue