[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [LIBXC] Python error extraction tweak.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Node ID 5aea6a32fc8bfd1e1614e44b05ef349252ac58a0 # Parent 8e035701b9ffa91caf95e01cd89579ebb1f6bd98 [LIBXC] Python error extraction tweak. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- tools/python/xen/lowlevel/xc/xc.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -r 8e035701b9ff -r 5aea6a32fc8b tools/python/xen/lowlevel/xc/xc.c --- a/tools/python/xen/lowlevel/xc/xc.c Thu Dec 07 11:45:00 2006 +0000 +++ b/tools/python/xen/lowlevel/xc/xc.c Thu Dec 07 11:46:07 2006 +0000 @@ -46,7 +46,10 @@ static PyObject *pyxc_error_to_exception const xc_error const *err = xc_get_last_error(); const char *desc = xc_error_code_to_desc(err->code); - if (err->message[1]) + if (err->code == XC_ERROR_NONE) + return PyErr_SetFromErrno(xc_error_obj); + + if (err->message[0] != '\0') pyerr = Py_BuildValue("(iss)", err->code, desc, err->message); else pyerr = Py_BuildValue("(is)", err->code, desc); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |