summaryrefslogtreecommitdiffstats
path: root/libvirt-override-virConnect.py
diff options
context:
space:
mode:
authorGuannan Ren <gren@redhat.com>2012-10-12 21:24:47 +0800
committerJiri Denemark <jdenemar@redhat.com>2012-10-12 17:01:07 +0200
commitcd4d093eef4a3a5ff7e2df436ba52501186634ec (patch)
treedc693c5e697fc1148afa579e635b81211838d1b7 /libvirt-override-virConnect.py
parent48e9333bec0e96b667ba5a17093ac4aeef3491a3 (diff)
downloadlibvirt-python-v6-cd4d093eef4a3a5ff7e2df436ba52501186634ec.tar.gz
libvirt-python-v6-cd4d093eef4a3a5ff7e2df436ba52501186634ec.tar.xz
libvirt-python-v6-cd4d093eef4a3a5ff7e2df436ba52501186634ec.zip
python: keep consistent handling of Python integer conversion
Resolve BZ:https://bugzilla.redhat.com/show_bug.cgi?id=816609 (cherry picked from commit 283f1c4aef8736d61c3965874a837537fea05dbc) libvirt_ulonglongUnwrap requires the integer type of python obj. But libvirt_longlongUnwrap still could handle python obj of Pyfloat_type which causes the float value to be rounded up to an integer. For example >>> dom.setSchedulerParameters({'vcpu_quota': 0.88}) 0 libvirt_longlongUnwrap treats 0.88 as a valid value 0 However >>> dom.setSchedulerParameters({'cpu_shares': 1000.22}) libvirt_ulonglongUnwrap will throw out an error "TypeError: an integer is required" The patch make this consistent.
Diffstat (limited to 'libvirt-override-virConnect.py')
0 files changed, 0 insertions, 0 deletions