[virt-tools-list] [virt-manager PATCH] addhardware: don't get duplicated disks

Martin Kletzander mkletzan at redhat.com
Wed Feb 19 12:56:24 UTC 2014


On Wed, Feb 19, 2014 at 10:36:06AM +0100, Giuseppe Scrivano wrote:
> 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

Thanks, pushed,

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140219/f23d69e4/attachment.sig>


More information about the virt-tools-list mailing list