diff mbox

[1/2] QMPMonitor: Introduce the get_greeting() method

Message ID 1287495334-18019-2-git-send-email-lcapitulino@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Luiz Capitulino Oct. 19, 2010, 1:35 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_monitor.py b/client/tests/kvm/kvm_monitor.py
index 40be77d..6447cb3 100644
--- a/client/tests/kvm/kvm_monitor.py
+++ b/client/tests/kvm/kvm_monitor.py
@@ -392,7 +392,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
@@ -652,6 +652,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().