summaryrefslogtreecommitdiffstats
path: root/generator.py
diff options
context:
space:
mode:
authorGuannan Ren <gren@redhat.com>2013-03-21 16:27:09 +0800
committerGuannan Ren <gren@redhat.com>2013-03-22 11:50:09 +0800
commit497a0ceecbdf4dc72f20612cf2a88a1e551bc8f4 (patch)
treed4f7ab7162199e5bd269fdd288c24d1ce764a7d9 /generator.py
parenta5036ccfd634186c57202c7f49c4eb6703911220 (diff)
downloadlibvirt-python-split-497a0ceecbdf4dc72f20612cf2a88a1e551bc8f4.tar.gz
libvirt-python-split-497a0ceecbdf4dc72f20612cf2a88a1e551bc8f4.tar.xz
libvirt-python-split-497a0ceecbdf4dc72f20612cf2a88a1e551bc8f4.zip
python: treat flags as default argument with value 0
The following four functions have not changed because default arguments have to come after positional arguments. Changing them will break the the binding APIs. migrate(self, dconn, flags, dname, uri, bandwidth): migrate2(self, dconn, dxml, flags, dname, uri, bandwidth): migrateToURI(self, duri, flags, dname, bandwidth): migrateToURI2(self, dconnuri, miguri, dxml, flags, dname, bandwidth):
Diffstat (limited to 'generator.py')
-rwxr-xr-xgenerator.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/generator.py b/generator.py
index 986324a..fbaf797 100755
--- a/generator.py
+++ b/generator.py
@@ -1489,6 +1489,8 @@ def buildWrappers(module):
if n != index:
classes.write(", %s" % arg[0])
n = n + 1
+ if arg[0] == "flags":
+ classes.write("=0");
classes.write("):\n")
writeDoc(module, name, args, ' ', classes)
n = 0