summaryrefslogtreecommitdiffstats
path: root/sanitytest.py
diff options
context:
space:
mode:
authorGuannan Ren <gren@redhat.com>2013-05-17 14:30:10 +0800
committerEric Blake <eblake@redhat.com>2013-08-20 11:44:55 -0600
commitb357cfa0d3b243469eebd4ba7b7d332f533bb7db (patch)
tree8f66c113a8b72ee7fd72425a62b5853b2a91e5f5 /sanitytest.py
parentfb395ac9c8dbeac8d3c2296adbe0ab5b081c52d7 (diff)
downloadlibvirt-python-v6-b357cfa0d3b243469eebd4ba7b7d332f533bb7db.tar.gz
libvirt-python-v6-b357cfa0d3b243469eebd4ba7b7d332f533bb7db.tar.xz
libvirt-python-v6-b357cfa0d3b243469eebd4ba7b7d332f533bb7db.zip
python: return dictionary without value in case of no blockjobv1.0.5.7v1.0.5.6
https://bugzilla.redhat.com/show_bug.cgi?id=999077 Currently, when there is no blockjob, dom.blockJobInfo('vda') still reports error because it doesn'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 of string type. PyDict_SetItemString increments key/value reference count, so call Py_DECREF() for value. For key, we don't need to do this, because PyDict_SetItemString will handle it internally. (cherry picked from commit 0f9e67bfad96c4a2e69769d8a5908ee145a86766)
Diffstat (limited to 'sanitytest.py')
0 files changed, 0 insertions, 0 deletions