diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2013-02-05 12:55:09 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2013-02-05 15:40:20 +0000 |
commit | 0f102b90f12f59e3a858c7b3d3bd867144f88424 (patch) | |
tree | 9e21c2f5e7d9f8696eccfb4456533000da81bd85 /generator.py | |
parent | 9654aeb6ce522bff6329e3f5e9426e33ee8a45fe (diff) | |
download | libvirt-python-v6-0f102b90f12f59e3a858c7b3d3bd867144f88424.tar.gz libvirt-python-v6-0f102b90f12f59e3a858c7b3d3bd867144f88424.tar.xz libvirt-python-v6-0f102b90f12f59e3a858c7b3d3bd867144f88424.zip |
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>
Diffstat (limited to 'generator.py')
-rwxr-xr-x | generator.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generator.py b/generator.py index 71ca883..ceade6b 100755 --- a/generator.py +++ b/generator.py @@ -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 |