[libvirt] [PATCHv2 7/8] python: Fix generated virInterface method names

Cole Robinson crobinso at redhat.com
Fri Oct 2 17:46:52 UTC 2009


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.

Signed-off-by: Cole Robinson <crobinso at redhat.com>
---
 python/generator.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/python/generator.py b/python/generator.py
index de5507e..17eaf1a 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -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
 
 
-- 
1.6.5.rc2




More information about the libvir-list mailing list