[LIBXC] Python error extraction tweak.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2006-12-07 11:46:07 +00:00
1 parent 0370b76da1
commit 3679c60f52
1 file changed
+4 -1
+4 -1
View File
@@ -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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.