[virt-tools-list] [PATCH virt-manager] addhardware: fix add storage from New VM wizard

Giuseppe Scrivano gscrivan at redhat.com
Fri Mar 7 14:26:00 UTC 2014


in validate_page_storage the variable 'disks` is used by the customize
dialog too, so always define it.

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

Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
---
 virtManager/addhardware.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index 75238d2..9cae794 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -1477,9 +1477,9 @@ class vmmAddHardware(vmmGObjectUI):
                 disk.driver_cache = cache
 
             # Generate target
+            disks = (self.vm.get_disk_devices() +
+                     self.vm.get_disk_devices(inactive=True))
             if not self.is_customize_dialog:
-                disks = (self.vm.get_disk_devices() +
-                         self.vm.get_disk_devices(inactive=True))
                 for d in disks:
                     if d.target not in used:
                         used.append(d.target)
-- 
1.8.5.3




More information about the virt-tools-list mailing list