Message ID | 1276820075-31310-3-git-send-email-mgoldish@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/client/tests/kvm/kvm_monitor.py b/client/tests/kvm/kvm_monitor.py index 12cf773..c2c6261 100644 --- a/client/tests/kvm/kvm_monitor.py +++ b/client/tests/kvm/kvm_monitor.py @@ -566,6 +566,18 @@ class QMPMonitor(Monitor): self._lock.release() + def get_event(self, name): + """ + Look for an event with the given name in the list of events. + + @param name: The name of the event to look for (e.g. 'RESET') + @return: An event object or None if none is found + """ + for e in self.get_events(): + if e.get("event") == name: + return e + + def clear_events(self): """ Clear the list of asynchronous events.