]> xenbits.xensource.com Git - libvirt.git/commitdiff
python: Raise exceptions if virDomain*Stats fail.
authorCole Robinson <crobinso@redhat.com>
Fri, 24 Jul 2009 15:05:27 +0000 (11:05 -0400)
committerCole Robinson <crobinso@redhat.com>
Sun, 26 Jul 2009 21:25:06 +0000 (17:25 -0400)
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.

python/generator.py

index 952883981d85c5ed5247024bfd15cf3fc8ba6262..feff7a3637632a392c00fb0547ac52e7f7e284ce 100755 (executable)
@@ -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