From df8016fc0b5f1694e0207b445780ffb2bf2155f1 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Thu, 7 Dec 2006 11:45:04 +0000 Subject: [PATCH 1/2] Remove broken call to XendDomainInfo.getSsidref(), fixing the obsolete HTTP server. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/server/SrvDomainDir.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/python/xen/xend/server/SrvDomainDir.py b/tools/python/xen/xend/server/SrvDomainDir.py index fe97b29aef..a134d5cbd9 100644 --- a/tools/python/xen/xend/server/SrvDomainDir.py +++ b/tools/python/xen/xend/server/SrvDomainDir.py @@ -165,10 +165,9 @@ class SrvDomainDir(SrvDir): req.write('') From 3679c60f52c2dd0dd797269f7fcf61ffab8a64dd Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 7 Dec 2006 11:46:07 +0000 Subject: [PATCH 2/2] [LIBXC] Python error extraction tweak. Signed-off-by: Keir Fraser --- tools/python/xen/lowlevel/xc/xc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index be02bf8ed8..e74a882fe0 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -46,7 +46,10 @@ static PyObject *pyxc_error_to_exception(void) 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);