diff options
author | Pavel Hrdina <phrdina@redhat.com> | 2015-09-22 14:27:42 +0200 |
---|---|---|
committer | Pavel Hrdina <phrdina@redhat.com> | 2015-10-05 08:35:52 +0200 |
commit | 61411050cb32864dfe535fce197a31303a067738 (patch) | |
tree | f2bc335dca0fc7aee35dd96611b1fe0a1e9bce80 /libvirt-qemu-override.c | |
parent | 5c74e41c974f17a9da80be8c9f1d42bc9bf6e33a (diff) | |
download | libvirt-python-61411050cb32864dfe535fce197a31303a067738.tar.gz |
Return NULL if python exception is set
There is a rule, python API fails, it also in those cases sets an
exception. We should follow those rules and in those cases return NULL.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Diffstat (limited to 'libvirt-qemu-override.c')
-rw-r--r-- | libvirt-qemu-override.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libvirt-qemu-override.c b/libvirt-qemu-override.c index 46d513d..f2e876a 100644 --- a/libvirt-qemu-override.c +++ b/libvirt-qemu-override.c @@ -271,10 +271,8 @@ libvirt_qemu_virConnectDomainQemuMonitorEventRegister(PyObject *self ATTRIBUTE_U unsigned int flags; if (!PyArg_ParseTuple(args, (char *) "OOzOI", &pyobj_conn, &pyobj_dom, - &event, &pyobj_cbData, &flags)) { - DEBUG("%s failed parsing tuple\n", __FUNCTION__); - return VIR_PY_INT_FAIL; - } + &event, &pyobj_cbData, &flags)) + return NULL; DEBUG("libvirt_qemu_virConnectDomainQemuMonitorEventRegister(%p %p %s %p %x) called\n", pyobj_conn, pyobj_dom, NULLSTR(event), pyobj_cbData, flags); |