Hollis Blanchard
2006-Jun-07 15:24 UTC
[Xen-devel] Re: [Xen-changelog] [xen-unstable] Expose the exception thrown by xen.lowlevel.xs.
On Wed, 2006-06-07 at 11:40 +0000, Xen patchbot-unstable wrote:> > diff -r 647d012b9a36 -r da81a493c8e5 tools/python/xen/lowlevel/xs/xs.c > --- a/tools/python/xen/lowlevel/xs/xs.c Thu Jun 01 12:11:59 2006 +0100 > +++ b/tools/python/xen/lowlevel/xs/xs.c Thu Jun 01 12:13:11 2006 +0100...> @@ -324,13 +333,13 @@ static PyObject *xspy_set_permissions(Xs > th = strtoul(thstr, NULL, 16); > > if (!PyList_Check(perms)) { > - PyErr_SetString(PyExc_RuntimeError, "perms must be a list"); > + xs_set_error(EINVAL); > goto exit; > } > xsperms_n = PyList_Size(perms); > xsperms = calloc(xsperms_n, sizeof(struct xs_permissions)); > if (!xsperms) { > - PyErr_SetString(PyExc_RuntimeError, "out of memory"); > + xs_set_error(ENOMEM); > goto exit; > } > tuple0 = PyTuple_New(0);I couldn''t help but notice some inconsistent tab/spacing going on... seems to change throughout the file. -- Hollis Blanchard IBM Linux Technology Center _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel