[libvirt] [PATCH python v2] Fix handling of optional params in blockCopy()

Peter Krempa pkrempa at redhat.com
Tue Mar 12 08:13:39 UTC 2019


On Mon, Mar 11, 2019 at 23:34:50 +0200, Nir Soffer wrote:
> Commit 2b4bd07e0a22 (Add check for params, nparams being a dictionary)
> changed the way the optional params argument is treated. If
> libvirt.virDomain.blockCopy() is called without specifying params,
> params is None, and the call will fail with:
> 
>     TypeError: block params must be a dictionary
> 
> This is wrong as params is defined as kwarg, breaking existing libvirt
> users like oVirt. Add a check for Py_None, so we accept either a dict or
> None and fail with TypeError with anything else.
> 
> Resolves: https://bugzilla.redhat.com/1687114
> 
> Signed-off-by: Nir Soffer <nsoffer at redhat.com>
> ---
>  libvirt-override.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

ACK && pushed. Thanks for fixing this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190312/8ed378fc/attachment-0001.sig>


More information about the libvir-list mailing list