diff --git a/lib/ansible/modules/net_tools/nmcli.py b/lib/ansible/modules/net_tools/nmcli.py index ac5511d7ae..90a989b050 100644 --- a/lib/ansible/modules/net_tools/nmcli.py +++ b/lib/ansible/modules/net_tools/nmcli.py @@ -627,7 +627,7 @@ class Nmcli(object): try: proxy = bus.get_object(service_name, "/org/freedesktop/NetworkManager/Settings") settings = dbus.Interface(proxy, "org.freedesktop.NetworkManager.Settings") - except dbus.Exceptions.DBusException as e: + except dbus.exceptions.DBusException as e: self.module.fail_json(msg="Unable to read Network Manager settings from DBus system bus: %s" % to_native(e), details="Please check if NetworkManager is installed and" " service network-manager is started.")