From a6daa0108e072db02855e4203b7cd6066ddc2b39 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 18 May 2010 13:46:27 +0200 Subject: python: don't ignore virInitialize failure in module initialization * python/libvirt-override.c (initlibvirtmod): Upon virInitialize failure, skip the Py_InitModule call. --- libvirt-override.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 *) -- cgit