summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hahn <hahn@univention.de>2018-11-01 11:20:40 +0100
committerMichal Privoznik <mprivozn@redhat.com>2018-11-01 14:09:20 +0100
commit9af6f1a5d3cf7ab86615dffbf140c827c6db697e (patch)
treec900686485f34b9772addab67019ba3c8503aafe
parentc8b6e5fc3c8103159f29cf4fa3bbfb777e8be08e (diff)
downloadlibvirt-python-9af6f1a5d3cf7ab86615dffbf140c827c6db697e.tar.gz
event-test.py: Report ERROR events
VIR_DOMAIN_EVENT_ID_IO_ERROR and VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON callbacks receive the same 'action' parameter, so also translate that numeric action to a descriptive text for the first callback. Signed-off-by: Philipp Hahn <hahn@univention.de>
-rwxr-xr-xexamples/event-test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/event-test.py b/examples/event-test.py
index 5e1ee9e..4bff554 100755
--- a/examples/event-test.py
+++ b/examples/event-test.py
@@ -534,8 +534,8 @@ def myDomainEventWatchdogCallback(conn, dom, action, opaque):
def myDomainEventIOErrorCallback(conn, dom, srcpath, devalias, action, opaque):
- print("myDomainEventIOErrorCallback: Domain %s(%s) %s %s %d" % (
- dom.name(), dom.ID(), srcpath, devalias, action))
+ print("myDomainEventIOErrorCallback: Domain %s(%s) %s %s %s" % (
+ dom.name(), dom.ID(), srcpath, devalias, ERROR_EVENTS[action]))
def myDomainEventIOErrorReasonCallback(conn, dom, srcpath, devalias, action, reason, opaque):