[libvirt] [PATCH] python: don't mask libvirt errors

Eric Blake eblake at redhat.com
Fri Aug 31 22:15:40 UTC 2012


On 08/31/2012 03:05 PM, Peter Krempa wrote:
> On 08/31/12 19:10, Eric Blake wrote:
>> A user reported this crash when using python bindings:
>>

>>
>> In the python bindings, returning NULL makes python think an
>> exception was thrown, while returning the None object lets the
>> wrappers know that a libvirt error exists.
>>
>> Reported by Nox DaFox, fix suggested by Dan Berrange.
>>
>> * python/libvirt-override.c (libvirt_virDomainBlockPeek)
>> (libvirt_virDomainMemoryPeek): Return python's None object, so
>> wrapper knows to check libvirt error.
>> ---
>>   python/libvirt-override.c | 8 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
> 
> ACK.

Thanks; pushed.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120831/2c9d4ea3/attachment-0001.sig>


More information about the libvir-list mailing list