summaryrefslogtreecommitdiffstats
path: root/libvirt-override.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-05-18 13:46:27 +0200
committerJim Meyering <meyering@redhat.com>2010-05-18 19:23:33 +0200
commita6daa0108e072db02855e4203b7cd6066ddc2b39 (patch)
tree5d767628c135a06a0e7b6d84cc48fabc215f95c1 /libvirt-override.c
parent99d0d2371deb18d969fdbf7fb7805540b7c4517e (diff)
downloadlibvirt-python-v6-a6daa0108e072db02855e4203b7cd6066ddc2b39.tar.gz
libvirt-python-v6-a6daa0108e072db02855e4203b7cd6066ddc2b39.tar.xz
libvirt-python-v6-a6daa0108e072db02855e4203b7cd6066ddc2b39.zip
python: don't ignore virInitialize failure in module initialization
* python/libvirt-override.c (initlibvirtmod): Upon virInitialize failure, skip the Py_InitModule call.
Diffstat (limited to 'libvirt-override.c')
-rw-r--r--libvirt-override.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libvirt-override.c b/libvirt-override.c
index b97445b..c9721f7 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -3543,7 +3543,8 @@ initcygvirtmod
if (initialized != 0)
return;
- virInitialize();
+ if (virInitialize() < 0)
+ return;
/* initialize the python extension module */
Py_InitModule((char *)