Re: [PATCH] python: return dictionay without value in case of no blockjob

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

 



On 07/13/2013 01:36 AM, Michal Privoznik wrote:
On 17.05.2013 08:30, Guannan Ren wrote:
s/dictionay/dictionary/ in $SUBJ

Currently, when there is no blockjob, dom.blockJobInfo('vda')
still reports error because it didn't distinguish return value 0 from -1.
s/didn't/doesn't/

libvirt.libvirtError: virDomainGetBlockJobInfo() failed

virDomainGetBlockJobInfo() API return value:
  -1 in case of failure, 0 when nothing found, 1 found.

And use PyDict_SetItemString instead of PyDict_SetItem when key is
string type. PyDict_SetItemString increments key/value reference
s/string type/of string type/

count, so calling Py_DECREF() for value. For key, we don't need to
s/calling/call/

do this, because PyDict_SetItemString will handle it internally.
---
  python/libvirt-override.c | 54 ++++++++++++++++++++++++++++++++++-------------
  1 file changed, 39 insertions(+), 15 deletions(-)
ACK with the commit message fixed.

Michal

   Thanks for this review.
   I pushed with these fixed

   Guannan

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]