lib/gpg: Use nicer helper for gpg error messages

The vast majority of invocations of `ot_gpgme_error_to_gio_error()` were paired
with `g_prefix_error()`; let's combine them for the same reason we do
`glnx_throw_errno_prefix()`. For the few cases that don't we might as well add
some prefix.

I also changed it to `return FALSE` in prep for more style porting.

Closes: #1135
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-09-07 15:55:16 +00:00
1 parent 1f6fc009f7
commit 6578c362fe
5 files changed
+37 -53

No files matched your search

+1 -2
View File
@@ -133,8 +133,7 @@ ostree_gpg_verify_result_initable_init (GInitable *initable,
gpg_error = gpgme_new (&result->context);
if (gpg_error != GPG_ERR_NO_ERROR)
{
ot_gpgme_error_to_gio_error (gpg_error, error);
g_prefix_error (error, "Unable to create context: ");
ot_gpgme_throw (gpg_error, error, "Unable to create context");
goto out;
}