summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2007-03-15 15:23:21 +0000
committerDaniel Veillard <veillard@redhat.com>2007-03-15 15:23:21 +0000
commit6e0f43995baebd74a2789e2f68d2b70efd1d06b8 (patch)
treef1dbdd13f37f5b9daab1595170a8bd32f373c3ac
parente04a275034df1ca962205bd93c9c55aefd1c8903 (diff)
downloadlibvirt-python-split-6e0f43995baebd74a2789e2f68d2b70efd1d06b8.tar.gz
libvirt-python-split-6e0f43995baebd74a2789e2f68d2b70efd1d06b8.tar.xz
libvirt-python-split-6e0f43995baebd74a2789e2f68d2b70efd1d06b8.zip
* python/generator.py: fix the python binding generation for
virNetworkLookup...() functions, which were clashing with equivalent virConnLookup...() equivalents, as reported by Tatsuro Enokura Daniel
-rwxr-xr-xgenerator.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/generator.py b/generator.py
index 50a3bee..2048765 100755
--- a/generator.py
+++ b/generator.py
@@ -576,12 +576,16 @@ function_post = {
}
def nameFixup(name, classe, type, file):
+ # avoid a desastrous clash
listname = classe + "List"
ll = len(listname)
l = len(classe)
if name[0:l] == listname:
func = name[l:]
func = string.lower(func[0:1]) + func[1:]
+ elif name[0:16] == "virNetworkLookup":
+ func = name[3:]
+ func = string.lower(func[0:1]) + func[1:]
elif name[0:12] == "virDomainGet":
func = name[12:]
func = string.lower(func[0:1]) + func[1:]