summaryrefslogtreecommitdiffstats
path: root/generator.py
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2011-09-14 16:25:42 -0400
committerCole Robinson <crobinso@redhat.com>2011-09-15 16:44:50 -0400
commitcfe35a64709acff19bb3eaa2457474bf04d2e359 (patch)
tree95b629af06b981b519b3049601d0a8ece778e35c /generator.py
parent6be93bf7ec177d221c9bbc03b86810cd06a0a2b2 (diff)
downloadlibvirt-python-v6-cfe35a64709acff19bb3eaa2457474bf04d2e359.tar.gz
libvirt-python-v6-cfe35a64709acff19bb3eaa2457474bf04d2e359.tar.xz
libvirt-python-v6-cfe35a64709acff19bb3eaa2457474bf04d2e359.zip
python: Fix libvirt.py generation to include virterror info
Recent generator refactoring broke libvirt.py. With this patch, libvirt.py is generated exactly the same as before offending commit 9eba0d25.
Diffstat (limited to 'generator.py')
-rwxr-xr-xgenerator.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/generator.py b/generator.py
index 327e1d5..d855d6b 100755
--- a/generator.py
+++ b/generator.py
@@ -120,7 +120,8 @@ class docParser(xml.sax.handler.ContentHandler):
if attrs.has_key('field'):
self.function_return_field = attrs['field']
elif tag == 'enum':
- if attrs['file'] == "libvirt":
+ if (attrs['file'] == "libvirt" or
+ attrs['file'] == "virterror"):
enum(attrs['type'],attrs['name'],attrs['value'])
elif attrs['file'] == "libvirt-qemu":
qemu_enum(attrs['type'],attrs['name'],attrs['value'])
@@ -130,7 +131,9 @@ class docParser(xml.sax.handler.ContentHandler):
print "end %s" % tag
if tag == 'function':
if self.function != None:
- if self.function_module == "libvirt":
+ if (self.function_module == "libvirt" or
+ self.function_module == "event" or
+ self.function_module == "virterror"):
function(self.function, self.function_descr,
self.function_return, self.function_args,
self.function_file, self.function_module,