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

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

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.

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

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.


   Thanks for this review.
   I pushed with these fixed


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