[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] Python bindings, errors & exceptions



Daniel P. Berrange wrote:
On Fri, Mar 23, 2007 at 12:12:56PM +0000, Richard W.M. Jones wrote:
[...]
  class virConnect:			# libvirtclass.py
    # ...
    def listNetworks(self):
[...]

  static PyObject *			// libvir.c
  libvirt_virConnectListNetworks(PyObject *self ATTRIBUTE_UNUSED,
			       PyObject *args) {
[...]
Yes, returning None here is totally bogus - it should be raising a
libvirtError object.

Which code is wrong here? From looking at this it was my impression that listNetworks is autogenerated by generator.py, and all the code in libvir.c is hand-written, but you say:

Indeed they should - all the generated C code bindings do - its just a few
of these hand written bindings that are wrong.

Rich.

--
Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421
 "[Negative numbers] darken the very whole doctrines of the equations
 and make dark of the things which are in their nature excessively
 obvious and simple" (Francis Maseres FRS, mathematician, 1759)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]