mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
python/machine.py: Don't modify state in _base_args()
Don't append to the _remove_files list during _base_args; instead do so during _launch. Rework _base_args as a @property to help facilitate this impression. This has the additional benefit of making the type of _console_address easier to analyze statically. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-id: 20201006235817.3280413-5-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
c5e61a6da8
commit
652809dfa6
2 changed files with 14 additions and 10 deletions
|
@ -19,7 +19,7 @@ subclass of QEMUMachine, respectively.
|
|||
|
||||
import os
|
||||
import socket
|
||||
from typing import Optional, TextIO
|
||||
from typing import List, Optional, TextIO
|
||||
|
||||
from .machine import QEMUMachine
|
||||
|
||||
|
@ -111,8 +111,9 @@ class QEMUQtestMachine(QEMUMachine):
|
|||
self._qtest = None
|
||||
self._qtest_path = os.path.join(sock_dir, name + "-qtest.sock")
|
||||
|
||||
def _base_args(self):
|
||||
args = super()._base_args()
|
||||
@property
|
||||
def _base_args(self) -> List[str]:
|
||||
args = super()._base_args
|
||||
args.extend(['-qtest', 'unix:path=' + self._qtest_path,
|
||||
'-accel', 'qtest'])
|
||||
return args
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue