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