|
@@ -16,12 +16,13 @@
|
|
|
import logging
|
|
|
import os
|
|
|
import subprocess
|
|
|
-import qmp.qmp
|
|
|
import re
|
|
|
import shutil
|
|
|
import socket
|
|
|
import tempfile
|
|
|
|
|
|
+from . import qmp
|
|
|
+
|
|
|
|
|
|
LOG = logging.getLogger(__name__)
|
|
|
|
|
@@ -66,7 +67,7 @@ class QEMUMachineAddDeviceError(QEMUMachineError):
|
|
|
failures reported by the QEMU binary itself.
|
|
|
"""
|
|
|
|
|
|
-class MonitorResponseError(qmp.qmp.QMPError):
|
|
|
+class MonitorResponseError(qmp.QMPError):
|
|
|
"""
|
|
|
Represents erroneous QMP monitor reply
|
|
|
"""
|
|
@@ -267,8 +268,8 @@ def _pre_launch(self):
|
|
|
self._qemu_log_path = os.path.join(self._temp_dir, self._name + ".log")
|
|
|
self._qemu_log_file = open(self._qemu_log_path, 'wb')
|
|
|
|
|
|
- self._qmp = qmp.qmp.QEMUMonitorProtocol(self._vm_monitor,
|
|
|
- server=True)
|
|
|
+ self._qmp = qmp.QEMUMonitorProtocol(self._vm_monitor,
|
|
|
+ server=True)
|
|
|
|
|
|
def _post_launch(self):
|
|
|
self._qmp.accept()
|
|
@@ -384,7 +385,7 @@ def command(self, cmd, conv_keys=True, **args):
|
|
|
"""
|
|
|
reply = self.qmp(cmd, conv_keys, **args)
|
|
|
if reply is None:
|
|
|
- raise qmp.qmp.QMPError("Monitor is closed")
|
|
|
+ raise qmp.QMPError("Monitor is closed")
|
|
|
if "error" in reply:
|
|
|
raise MonitorResponseError(reply)
|
|
|
return reply["return"]
|