[virt-tools-list] [virt-manager PATCH] addhardware: don't get duplicated disks
Giuseppe Scrivano
gscrivan at redhat.com
Wed Feb 19 09:36:06 UTC 2014
Martin Kletzander <mkletzan at redhat.com> writes:
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
> virtManager/addhardware.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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)
ACK
Giuseppe
More information about the virt-tools-list
mailing list