[gnome-software] trivial: Use the correct error code when cancelling a search request
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Use the correct error code when cancelling a search request
- Date: Tue, 11 Jul 2017 17:22:16 +0000 (UTC)
commit 2d80d7d8c9849d6c27ce423d551dd1a7b0be1505
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 11 18:21:47 2017 +0100
trivial: Use the correct error code when cancelling a search request
plugins/packagekit/gs-plugin-packagekit-history.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit-history.c
b/plugins/packagekit/gs-plugin-packagekit-history.c
index dfcd415..237610c 100644
--- a/plugins/packagekit/gs-plugin-packagekit-history.c
+++ b/plugins/packagekit/gs-plugin-packagekit-history.c
@@ -166,6 +166,15 @@ gs_plugin_packagekit_refine (GsPlugin *plugin,
}
} else if (g_error_matches (error_local,
G_IO_ERROR,
+ G_IO_ERROR_CANCELLED)) {
+ g_set_error (error,
+ GS_PLUGIN_ERROR,
+ GS_PLUGIN_ERROR_CANCELLED,
+ "Failed to get history: %s",
+ error_local->message);
+ return FALSE;
+ } else if (g_error_matches (error_local,
+ G_IO_ERROR,
G_IO_ERROR_TIMED_OUT)) {
g_debug ("No history as PackageKit took too long: %s",
error_local->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]