Skip to content
  • Nir Soffer's avatar
    Fix handling of optional params in blockCopy() · 5d6228d4
    Nir Soffer authored and Peter Krempa's avatar Peter Krempa committed
    Commit 2b4bd07e (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: default avatarNir Soffer <nsoffer@redhat.com>
    5d6228d4