提交 9ed46a3e 编写于 作者: C Cole Robinson

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.
上级 69d8c753
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册