[virt-manager PATCH 2/2] virt-manager, details: properly check for pool presence

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

 



commit 5e8f35f5e6d2f86a6846e3725885980eb51a5eae introduced this
problem.

Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx>
---
 virtManager/details.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/virtManager/details.py b/virtManager/details.py
index 3a20b75..38dfeca 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -2586,9 +2586,11 @@ class vmmDetails(vmmGObjectUI):
             size = "-"
         else:
             if source_pool:
-                pool = self.conn.get_pool(source_pool)
-                if pool:
+                try:
+                    pool = self.conn.get_pool(source_pool)
                     vol = pool.get_volume(path)
+                except KeyError:
+                    vol = None
             else:
                 vol = self.conn.get_vol_by_path(path)
 
-- 
1.9.3

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux