mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-12-22 08:24:40 +03:00
python: Raise exceptions if virDomain*Stats fail.
The generator couldn't tell that the stats return values were pointers. Stick a white list in the function which tries to make this distinction.
This commit is contained in:
@@ -683,7 +683,10 @@ functions_list_exception_test = {
|
|||||||
functions_list_default_test = "%s is None"
|
functions_list_default_test = "%s is None"
|
||||||
|
|
||||||
def is_list_type (name):
|
def is_list_type (name):
|
||||||
return name[-1:] == "*"
|
whitelist = [ "virDomainBlockStats",
|
||||||
|
"virDomainInterfaceStats" ]
|
||||||
|
|
||||||
|
return name[-1:] == "*" or name in whitelist
|
||||||
|
|
||||||
def nameFixup(name, classe, type, file):
|
def nameFixup(name, classe, type, file):
|
||||||
# avoid a desastrous clash
|
# avoid a desastrous clash
|
||||||
|
|||||||
Reference in New Issue
Block a user