]> xenbits.xensource.com Git - libvirt.git/commitdiff
python: Fix generated virInterface method names
authorCole Robinson <crobinso@redhat.com>
Wed, 23 Sep 2009 16:51:55 +0000 (12:51 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 5 Oct 2009 17:31:38 +0000 (13:31 -0400)
A mistake in the generator was causing virInterface methods to be generated
with unpredicatable names ('ceUndefine', instead of just 'undefine'). This
fixes the method names to match existing convention.

Does anyone care if we are breaking API compat? My guess is that no one is
using the python interface bindings yet.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
python/generator.py

index de5507e23ad50b92bdb4dd7729df56ba4d0a46b9..17eaf1a479a281f90084357dedd26f40da9f6469 100755 (executable)
@@ -761,10 +761,10 @@ def nameFixup(name, classe, type, file):
         func = name[10:]
         func = string.lower(func[0:1]) + func[1:]
     elif name[0:15] == "virInterfaceGet":
-        func = name[13:]
+        func = name[15:]
         func = string.lower(func[0:1]) + func[1:]
     elif name[0:12] == "virInterface":
-        func = name[10:]
+        func = name[12:]
         func = string.lower(func[0:1]) + func[1:]
     elif name[0:12] == 'virSecretGet':
         func = name[12:]
@@ -817,6 +817,9 @@ def nameFixup(name, classe, type, file):
         func = "OSType"
     if func == "xMLDesc":
         func = "XMLDesc"
+    if func == "mACString":
+        func = "MACString"
+
     return func