From: Cole Robinson Date: Wed, 23 Sep 2009 16:51:55 +0000 (-0400) Subject: python: Fix generated virInterface method names X-Git-Tag: v0.7.2~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e87ecd12ed8f56c7cab69c531be69b5bfa1f1f2;p=thirdparty%2Flibvirt.git python: Fix generated virInterface method names 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 --- diff --git a/python/generator.py b/python/generator.py index de5507e23a..17eaf1a479 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