mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 11:39:53 +00:00
python, iotests: replace qmp with aqmp
Swap out the synchronous QEMUMonitorProtocol from qemu.qmp with the sync wrapper from qemu.aqmp instead. Add an escape hatch in the form of the environment variable QEMU_PYTHON_LEGACY_QMP which allows you to cajole QEMUMachine into using the old implementation, proving that both implementations work concurrently. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-id: 20211026175612.4127598-9-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
f122be6093
commit
76cd358671
@ -41,7 +41,6 @@ from typing import (
|
||||
)
|
||||
|
||||
from qemu.qmp import ( # pylint: disable=import-error
|
||||
QEMUMonitorProtocol,
|
||||
QMPMessage,
|
||||
QMPReturnValue,
|
||||
SocketAddrT,
|
||||
@ -50,6 +49,12 @@ from qemu.qmp import ( # pylint: disable=import-error
|
||||
from . import console_socket
|
||||
|
||||
|
||||
if os.environ.get('QEMU_PYTHON_LEGACY_QMP'):
|
||||
from qemu.qmp import QEMUMonitorProtocol
|
||||
else:
|
||||
from qemu.aqmp.legacy import QEMUMonitorProtocol
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user