def _nm_profile_volatile_update2_call_back(nm_profile, result, user_data): main_loop = user_data if main_loop.is_cancelled: return try: success = nm_profile.update2_finish(result) except Exception as e: main_loop.fail( error.LsrNetworkNmError( "Connection volatilize aborted on {id}/{uuid}: error={error}". format(id=nm_profile.get_id(), uuid=nm_profile.get_uuid(), error=e))) if success: main_loop.quit() else: main_loop.fail( error.LsrNetworkNmError( "Connection volatilize aborted on {id}/{uuid}: error=unknown". format(id=nm_profile.get_id(), uuid=nm_profile.get_uuid())))
def _deactivate_fail(main_loop, handler_id, nm_ac, msg): if nm_ac: nm_ac.handler_disconnect(handler_id) logging.error(msg) main_loop.fail(error.LsrNetworkNmError(msg))
def _timeout_call_back(self, _user_data): logging.error("Timeout") self.fail(error.LsrNetworkNmError("Timeout"))