summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2009-07-24 11:05:27 -0400
committerCole Robinson <crobinso@redhat.com>2009-07-26 17:25:06 -0400
commita5d4455ba21721b4739aab09b2c8116d138b29f3 (patch)
treeca42b6338233bc361d58ad219cd3bef8cf3c3399
parentd68dda19ea1bb690e00113c79941ce359943896a (diff)
downloadlibvirt-python-split-a5d4455ba21721b4739aab09b2c8116d138b29f3.tar.gz
libvirt-python-split-a5d4455ba21721b4739aab09b2c8116d138b29f3.tar.xz
libvirt-python-split-a5d4455ba21721b4739aab09b2c8116d138b29f3.zip
python: Raise exceptions if virDomain*Stats fail.v0.7.0
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.
-rwxr-xr-xgenerator.py5
1 files changed, 4 insertions, 1 deletions
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