@@ -408,7 +408,7 @@ class QMPMonitor(Monitor):
while time.time() < end_time:
for obj in self._read_objects():
if "QMP" in obj:
- self._greeting = obj["QMP"]
+ self._greeting = obj
break
if self._greeting:
break
@@ -597,6 +597,13 @@ class QMPMonitor(Monitor):
self._lock.release()
+ def get_greeting(self):
+ """
+ Return QMP greeting message.
+ """
+ return self._greeting
+
+
# Command wrappers
# Note: all of the following functions raise exceptions in a similar manner
# to cmd() and _get_command_output().