From a5d4455ba21721b4739aab09b2c8116d138b29f3 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Fri, 24 Jul 2009 11:05:27 -0400 Subject: 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. --- generator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generator.py b/generator.py index 9528839..feff7a3 100755 --- a/generator.py +++ b/generator.py @@ -683,7 +683,10 @@ functions_list_exception_test = { functions_list_default_test = "%s is None" def is_list_type (name): - return name[-1:] == "*" + whitelist = [ "virDomainBlockStats", + "virDomainInterfaceStats" ] + + return name[-1:] == "*" or name in whitelist def nameFixup(name, classe, type, file): # avoid a desastrous clash -- cgit