22 lines
867 B
Diff
22 lines
867 B
Diff
|
Subject: addhardware: don't get duplicated disks
|
||
|
From: Martin Kletzander mkletzan@redhat.com Wed Feb 19 10:11:14 2014 +0100
|
||
|
Date: Wed Feb 19 10:11:14 2014 +0100:
|
||
|
Git: 7c437f6a6f07c81bcf20cecece462c857d0b5848
|
||
|
|
||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||
|
|
||
|
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
|
||
|
index b446a9d..ed25c26 100644
|
||
|
--- a/virtManager/addhardware.py
|
||
|
+++ b/virtManager/addhardware.py
|
||
|
@@ -1481,7 +1481,8 @@ class vmmAddHardware(vmmGObjectUI):
|
||
|
disks = (self.vm.get_disk_devices() +
|
||
|
self.vm.get_disk_devices(inactive=True))
|
||
|
for d in disks:
|
||
|
- used.append(d.target)
|
||
|
+ if d.target not in used:
|
||
|
+ used.append(d.target)
|
||
|
|
||
|
prefer_ctrl = self._set_disk_controller(disk, controller_model, disks)
|
||
|
|