1
0
mirror of https://gitlab.com/libvirt/libvirt-python.git synced 2025-07-24 00:58:54 +03:00

* python/generator.py: fix the python binding generation for

virNetworkLookup...() functions, which were clashing with
  equivalent virConnLookup...() equivalents, as reported by
  Tatsuro Enokura
Daniel
This commit is contained in:
Daniel Veillard
2007-03-15 15:23:21 +00:00
parent e04a275034
commit 6e0f43995b

View File

@ -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:]