[gnome-boxes] libvirt-broker: Throw error on failure to connect



commit e57a9cd558224465cdcc5b9dc68a25470a9d5364
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Mar 15 19:27:36 2016 +0000

    libvirt-broker: Throw error on failure to connect
    
    We were happily adding the source even after failing to connect to it,
    which among other things, meant removal of configuration of all the
    domains on the source in question.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760692

 src/libvirt-broker.vala |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/libvirt-broker.vala b/src/libvirt-broker.vala
index ad3fbb9..1ca8759 100644
--- a/src/libvirt-broker.vala
+++ b/src/libvirt-broker.vala
@@ -108,14 +108,10 @@ private class Boxes.LibvirtBroker : Boxes.Broker {
 
         var connection = new GVir.Connection (source.uri);
 
-        try {
-            yield connection.open_async (null);
-            yield connection.fetch_domains_async (null);
-            yield connection.fetch_storage_pools_async (null);
-            yield Boxes.ensure_storage_pool (connection);
-        } catch (GLib.Error error) {
-            warning (error.message);
-        }
+        yield connection.open_async (null);
+        yield connection.fetch_domains_async (null);
+        yield connection.fetch_storage_pools_async (null);
+        yield Boxes.ensure_storage_pool (connection);
 
         connections.insert (source.name, connection);
 


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