Files
qemu/scripts
Lukáš Doktor 2782fc517d qemu|qtest: Avoid dangerous arguments
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. The same issue applies in
inherited qtest module.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20170818142613.32394-3-ldoktor@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-09-15 20:12:00 -03:00
..
2017-03-03 16:40:02 +01:00
2017-07-20 09:56:41 +02:00
2017-07-11 17:42:49 +03:00
2015-10-12 18:44:54 +02:00
2017-09-04 13:09:13 +02:00
2015-10-29 17:59:27 +00:00
2017-09-15 20:12:00 -03:00
2017-09-15 20:12:00 -03:00
2017-05-19 12:29:01 +02:00