On Thu, Jul 20, 2017 at 06:28:06PM +0200, Lukáš Doktor wrote:
> The list object is mutable in python and potentially might modify other
> object's arguments when used as default argument. Reproducer:
>
> >>> vm1 = QEMUMachine("qemu")
> >>> vm2 = QEMUMachine("qemu")
> >>> vm1._wrapper.append("foo")
> >>> print vm2._wrapper
> ['foo']
>
> In this case the `args` is actually copied so it would be safe to keep
> it, but it's not a good practice to keep it.
>
> Signed-off-by: Lukáš Doktor <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
--
Eduardo