[libvirt] [PATCH] python: Raise exceptions if virDomain*Stats fail.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/python/generator.py b/python/generator.py
index 9528839..feff7a3 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
-- 
1.6.0.6

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]