[virt-manager PATCH] virtinst.storage: check _pool_xml before using it

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

 



Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1450311

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 virtinst/storage.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/virtinst/storage.py b/virtinst/storage.py
index a6963d50..66201efc 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -698,7 +698,9 @@ class StorageVolume(_StorageObject):
                 return self.TYPE_DIR
             elif self.type == "network":
                 return self.TYPE_NETWORK
-        return self._pool_xml.get_disk_type()
+        if self._pool_xml:
+            return self._pool_xml.get_disk_type()
+        return None
     file_type = property(_get_vol_type)
 
 
-- 
2.13.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