On 05/18/2010 05:56 AM, Jim Meyering wrote: >> Actually I've got another idea. Make the Py_InitModule() call conditional >> on virInitialize() suceeding. That way if virInitialize() fails, none of >> the libvirt APIs will get bound to the python layer, preventing their >> use > > Either works for me: > >>From 7dbf938ab10657a94702cd766afa336fc68d8c80 Mon Sep 17 00:00:00 2001 > From: Jim Meyering <meyering@xxxxxxxxxx> > 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. I like this second approach better. ACK. > { > static int initialized = 0; While you're touching this file, do you want to remove the extraneous initialization (we might as well rely on .bss for zero-initialized data). -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list