aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python/xen/lowlevel/xu/xu.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/python/xen/lowlevel/xu/xu.c')
-rw-r--r--tools/python/xen/lowlevel/xu/xu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/python/xen/lowlevel/xu/xu.c b/tools/python/xen/lowlevel/xu/xu.c
index c9c5b3873a..359cb71a2d 100644
--- a/tools/python/xen/lowlevel/xu/xu.c
+++ b/tools/python/xen/lowlevel/xu/xu.c
@@ -1370,7 +1370,8 @@ static PyObject *xu_port_new(PyObject *self, PyObject *args, PyObject *kwds)
fail1:
PyObject_Del((PyObject *)xup);
- return NULL;
+ PyErr_SetString(PyExc_ValueError, "cannot create port");
+ return NULL;
}
static PyObject *xu_port_getattr(PyObject *obj, char *name)