[virt-manager PATCH] delete: do not throw exception if the volume or the pool don't exist

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

 



Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1219427

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

diff --git a/virtManager/delete.py b/virtManager/delete.py
index 2addcfa..a7d4ec2 100644
--- a/virtManager/delete.py
+++ b/virtManager/delete.py
@@ -236,7 +236,11 @@ def populate_storage_list(storage_list, vm, conn):
         if disk.source_pool:
             try:
                 pool = conn.get_pool(disk.source_pool)
+                if pool is None:
+                    return disk.path
                 vol = pool.get_volume(disk.path)
+                if vol is None:
+                    return disk.path
                 return vol.get_target_path()
             except KeyError:
                 return disk.path
-- 
2.1.0

_______________________________________________
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