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



commit 2c9ee3a2a0e703c63029cbe7c8f1dfc628310cf5
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]