mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-02 04:21:59 +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:
@ -576,12 +576,16 @@ function_post = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def nameFixup(name, classe, type, file):
|
def nameFixup(name, classe, type, file):
|
||||||
|
# avoid a desastrous clash
|
||||||
listname = classe + "List"
|
listname = classe + "List"
|
||||||
ll = len(listname)
|
ll = len(listname)
|
||||||
l = len(classe)
|
l = len(classe)
|
||||||
if name[0:l] == listname:
|
if name[0:l] == listname:
|
||||||
func = name[l:]
|
func = name[l:]
|
||||||
func = string.lower(func[0:1]) + func[1:]
|
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":
|
elif name[0:12] == "virDomainGet":
|
||||||
func = name[12:]
|
func = name[12:]
|
||||||
func = string.lower(func[0:1]) + func[1:]
|
func = string.lower(func[0:1]) + func[1:]
|
||||||
|
Reference in New Issue
Block a user