]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
python: cleanup vcpu related binding APIs
authorGuannan Ren <gren@redhat.com>
Fri, 28 Sep 2012 08:27:38 +0000 (16:27 +0800)
committerGuannan Ren <gren@redhat.com>
Mon, 8 Oct 2012 13:53:58 +0000 (21:53 +0800)
commit2832663f597adb0fc06770a92f3826e8129b408c
tree3864a57321dc1afeae4d12396cbda5a05e26fee1
parent0821ea6b3cf318a9fe4657d5cf77095f96154db8
python: cleanup vcpu related binding APIs

libvirt_virDomainGetVcpus: add error handling, return -1 instead of None
libvirt_virDomainPinVcpu and libvirt_virDomainPinVcpuFlags:
  check the type of argument
  make use of libvirt_boolUnwrap

  Set bitmap according to these values which are contained in given
  argument of vcpu tuple and turn off these bit corresponding to
  missing vcpus in argument tuple

  The original way ignored the error info from PyTuple_GetItem
  if index is out of range.
  "IndexError: tuple index out of range"
  The error message will only be raised on next command in interactive mode.
python/libvirt-override.c