[gnome-software] trivial: Do not fail resolve() if the reviews service is broken
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Do not fail resolve() if the reviews service is broken
- Date: Wed, 10 Feb 2016 14:05:16 +0000 (UTC)
commit 2047524580be448f7ed69a7c8a55981720ad2535
Author: Richard Hughes <richard hughsie com>
Date: Wed Feb 10 14:02:18 2016 +0000
trivial: Do not fail resolve() if the reviews service is broken
src/plugins/gs-plugin-xdg-app-reviews.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/gs-plugin-xdg-app-reviews.c b/src/plugins/gs-plugin-xdg-app-reviews.c
index a974c13..48b9b68 100644
--- a/src/plugins/gs-plugin-xdg-app-reviews.c
+++ b/src/plugins/gs-plugin-xdg-app-reviews.c
@@ -707,32 +707,36 @@ gs_plugin_refine (GsPlugin *plugin,
/* add reviews if possible */
if (flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEWS) {
for (l = *list; l != NULL; l = l->next) {
+ g_autoptr(GError) error_local = NULL;
app = GS_APP (l->data);
if (gs_app_get_reviews(app)->len > 0)
continue;
if (gs_app_get_id (app) == NULL)
continue;
- if (!gs_plugin_refine_reviews (plugin,
- app,
+ if (!gs_plugin_refine_reviews (plugin, app,
cancellable,
- error))
- return FALSE;
+ &error_local)) {
+ g_warning ("Failed to get reviews: %s",
+ error_local->message);
+ }
}
}
/* add ratings if possible */
if (flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS) {
for (l = *list; l != NULL; l = l->next) {
+ g_autoptr(GError) error_local = NULL;
app = GS_APP (l->data);
if (gs_app_get_review_ratings(app) != NULL)
continue;
if (gs_app_get_id (app) == NULL)
continue;
- if (!gs_plugin_refine_ratings (plugin,
- app,
+ if (!gs_plugin_refine_ratings (plugin, app,
cancellable,
- error))
- return FALSE;
+ &error_local)) {
+ g_warning ("Failed to get reviews: %s",
+ error_local->message);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]