From: Cole Robinson Date: Fri, 24 Jul 2009 15:05:27 +0000 (-0400) Subject: python: Raise exceptions if virDomain*Stats fail. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3c2051f86a78b2fc68c04c53cc6d6072f31aacf1;p=libvirt.git 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. --- diff --git a/python/generator.py b/python/generator.py index 952883981d..feff7a3637 100755 --- a/python/generator.py +++ b/python/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