Comment 1 for bug 1062051

Revision history for this message
Roman Yepishev (rye) wrote :

    def got_error(self, error):
        """Called by DBus when the state is retrieved from NM."""
        if isinstance(error, self.dbus.exceptions.DBusException) and \
                error.get_dbus_name() == DBUS_UNKNOWN_SERVICE:
            logger.debug("Network Manager not present")
            # Assuming since Network Manager is not installed,
            # the user has connected in some other way
            self.call_result_cb(ONLINE)
        else:
            logger.error("Error contacting NetworkManager: %s" %
                             str(error))
            self.call_result_cb(UNKNOWN)

This code assumes that the only case we get error from network manager is when it is not running.
However, if we don't satisfy "at_console" policy condition (e.g. logging in from SSH) then SD will receive an error which is not DBUS_UNKNOWN_SERVICE. How about setting ONLINE state on any error?