[gnome-boxes/wip/silence-some-build-warnings: 71/72] machine: Handle GLib.Error while deleting auth credentials



commit e80c25dd006e723f6eb31bfdcc6be967de246685
Author: Felipe Borges <felipeborges gnome org>
Date:   Sat Aug 11 18:58:59 2018 +0200

    machine: Handle GLib.Error while deleting auth credentials

 src/machine.vala | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index edae0b2d..7588356f 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -750,8 +750,12 @@ private void handle_auth () {
     }
 
     private async void delete_auth_credentials () {
-        yield Secret.password_clear (secret_auth_schema, null,
-                                    "gnome-boxes-machine-uuid", config.uuid);
+        try {
+            yield Secret.password_clear (secret_auth_schema, null,
+                                         "gnome-boxes-machine-uuid", config.uuid);
+        } catch (GLib.Error error) {
+            debug ("Failed to delete credentials for machine %s: %s", config.uuid, error.message);
+        }
     }
 
     public override int compare (CollectionItem other) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]