[gnome-software] snap: Hide warning when local snap doesn't have an icon
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] snap: Hide warning when local snap doesn't have an icon
- Date: Wed, 4 Dec 2019 16:02:28 +0000 (UTC)
commit e50a9389a82f506a89dfd429b917ba93791e4de2
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Dec 4 16:15:30 2019 +1300
snap: Hide warning when local snap doesn't have an icon
This is the case for many snaps and not considered a problem.
This error code is returned in snapd-glib >= 1.55, until then you will continue
to see this warning.
plugins/snap/gs-plugin-snap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 6ef850a8..f0afbb67 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -631,7 +631,8 @@ load_snap_icon (GsApp *app, SnapdClient *client, SnapdSnap *snap, GCancellable *
icon = snapd_client_get_icon_sync (client, gs_app_get_metadata_item (app, "snap::name"), cancellable,
&error);
if (icon == NULL) {
- g_warning ("Failed to load snap icon: %s", error->message);
+ if (!g_error_matches (error, SNAPD_ERROR, SNAPD_ERROR_NOT_FOUND))
+ g_warning ("Failed to load snap icon: %s", error->message);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]