summaryrefslogtreecommitdiffstats
path: root/generator.py
diff options
context:
space:
mode:
authorGuannan Ren <gren@redhat.com>2013-05-17 14:30:10 +0800
committerGuannan Ren <gren@redhat.com>2013-07-15 18:20:42 +0800
commitf8bc3a9ccc3f40d800d856a9c6d44bc225d621bd (patch)
tree4b343cb20f61428010ce1018d238b70942b1ca37 /generator.py
parent82395204f317217a2a9fd04c9d2db307c07a3978 (diff)
downloadlibvirt-python-split-f8bc3a9ccc3f40d800d856a9c6d44bc225d621bd.tar.gz
libvirt-python-split-f8bc3a9ccc3f40d800d856a9c6d44bc225d621bd.tar.xz
libvirt-python-split-f8bc3a9ccc3f40d800d856a9c6d44bc225d621bd.zip
python: return dictionary without value in case of no blockjobCVE-2013-4154CVE-2013-4153
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.
Diffstat (limited to 'generator.py')
0 files changed, 0 insertions, 0 deletions