1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-12-09 12:24:35 +03:00

Fix missing error constants in libvirt python module

The previous change to the generator, changed too much - only
the functions are in 'virerror.c', the constants remained in
'virerror.h' which could not be renamed for API compat reasons.

Add a test case to sanity check the generated python bindings

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2013-02-05 12:55:09 +00:00
parent 137229bf4a
commit 25ea8e47e7
3 changed files with 39 additions and 1 deletions

View File

@@ -122,8 +122,9 @@ class docParser(xml.sax.handler.ContentHandler):
if attrs.has_key('field'):
self.function_return_field = attrs['field']
elif tag == 'enum':
# enums come from header files, hence virterror.h
if (attrs['file'] == "libvirt" or
attrs['file'] == "virerror"):
attrs['file'] == "virterror"):
enum(attrs['type'],attrs['name'],attrs['value'])
elif attrs['file'] == "libvirt-lxc":
lxc_enum(attrs['type'],attrs['name'],attrs['value'])
@@ -134,6 +135,7 @@ class docParser(xml.sax.handler.ContentHandler):
if debug:
print "end %s" % tag
if tag == 'function':
# fuctions come from source files, hence 'virerror.c'
if self.function != None:
if (self.function_module == "libvirt" or
self.function_module == "virevent" or