Prevent setup_clone from changing the self._clone_macs list so that further calls will access the same data. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1027576 Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx> --- virtinst/cloner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/virtinst/cloner.py b/virtinst/cloner.py index 9ac0ee1..e1bb782 100644 --- a/virtinst/cloner.py +++ b/virtinst/cloner.py @@ -379,11 +379,12 @@ class Cloner(object): logging.warn(_("Setting the graphics device port to autoport, " "in order to avoid conflicting.")) dev.port = -1 + clone_macs = self._clone_macs[:] for iface in self._guest.get_devices("interface"): iface.target_dev = None - if self._clone_macs: - mac = self._clone_macs.pop() + if clone_macs: + mac = clone_macs.pop() else: mac = VirtualNetworkInterface.generate_mac(self.conn) iface.macaddr = mac -- 1.9.3 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list