diff options
author | Jim Meyering <meyering@redhat.com> | 2010-05-18 13:46:27 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-05-18 19:23:33 +0200 |
commit | a6daa0108e072db02855e4203b7cd6066ddc2b39 (patch) | |
tree | 5d767628c135a06a0e7b6d84cc48fabc215f95c1 /libvirt-override.c | |
parent | 99d0d2371deb18d969fdbf7fb7805540b7c4517e (diff) | |
download | libvirt-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.c | 3 |
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 *) |