From 2766829a67772f11568ecd87f2f335f04f78d5ce Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 5 Sep 2013 22:07:56 +0200 Subject: [PATCH] libnm-glib: don't warn when dbus object initialization fails with UNKNOWN_METHOD A common case where this warning was triggered, was the removal of IP6Config objects. As this can happen as a regular event, do not warn in this case. Signed-off-by: Thomas Haller --- libnm-glib/nm-object.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libnm-glib/nm-object.c b/libnm-glib/nm-object.c index 7cf2f1bc96..867fb856c6 100644 --- a/libnm-glib/nm-object.c +++ b/libnm-glib/nm-object.c @@ -638,8 +638,10 @@ async_inited (GObject *source, GAsyncResult *result, gpointer user_data) GError *error = NULL; if (!g_async_initable_init_finish (G_ASYNC_INITABLE (object), result, &error)) { - g_warning ("Could not create object for %s: %s", - nm_object_or_connection_get_path (object), error->message); + if (!g_error_matches (error, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD)) { + g_warning ("Could not create object for %s: %s", + nm_object_or_connection_get_path (object), error->message); + } g_error_free (error); g_object_unref (object); object = NULL;