]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
python: Adapt to virevent rename
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 28 Dec 2012 15:22:09 +0000 (16:22 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 28 Dec 2012 15:22:09 +0000 (16:22 +0100)
With our recent renames under src/util/* we forgot to adapt
python wrapper code generator. This results in some methods being
not exposed:

$ python examples/domain-events/events-python/event-test.py
Using uri:qemu:///system
Traceback (most recent call last):
  File "examples/domain-events/events-python/event-test.py", line 585, in <module>
    main()
  File "examples/domain-events/events-python/event-test.py", line 543, in main
    virEventLoopPureStart()
  File "examples/domain-events/events-python/event-test.py", line 416, in virEventLoopPureStart
    virEventLoopPureRegister()
  File "examples/domain-events/events-python/event-test.py", line 397, in virEventLoopPureRegister
    libvirt.virEventRegisterImpl(virEventAddHandleImpl,
AttributeError: 'module' object has no attribute 'virEventRegisterImpl'

python/generator.py

index e9b92709f2f53303d3f4ea78401ee291ad5dc5fd..bae4edcc13d1feaa320acca78f1eb87f191a0035 100755 (executable)
@@ -132,7 +132,7 @@ class docParser(xml.sax.handler.ContentHandler):
         if tag == 'function':
             if self.function != None:
                 if (self.function_module == "libvirt" or
-                    self.function_module == "event" or
+                    self.function_module == "virevent" or
                     self.function_module == "virterror"):
                     function(self.function, self.function_descr,
                              self.function_return, self.function_args,