diff --git a/lib/ansible/modules/net_tools/nmcli.py b/lib/ansible/modules/net_tools/nmcli.py index 6e204ba026c..ad08f8389b2 100644 --- a/lib/ansible/modules/net_tools/nmcli.py +++ b/lib/ansible/modules/net_tools/nmcli.py @@ -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