[PATCH python] override: GetCPUModelNames should return None on failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Right now, on failure, libvirt.py doesn't raise an exception and just
returns -1 to the user.
---
 libvirt-override.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvirt-override.c b/libvirt-override.c
index 7f746ed..9fed299 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -2326,7 +2326,7 @@ libvirt_virConnectGetCPUModelNames(PyObject *self ATTRIBUTE_UNUSED,
     LIBVIRT_END_ALLOW_THREADS;
 
     if (c_retval == -1)
-        return VIR_PY_INT_FAIL;
+        return VIR_PY_NONE;
 
     if ((rv = PyList_New(c_retval)) == NULL)
         goto error;
-- 
1.8.5.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]