diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2013-12-03 15:24:17 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2013-12-04 14:52:48 +0000 |
commit | 7f842365b192a514be30512c4f96abdbef9702a0 (patch) | |
tree | 533d65cb7740674cddc510c6a19bdf42081ba0db /libvirt-override-virConnect.py | |
parent | 9d9e2513c09e7ba7474c94455e5f82b3d00e6396 (diff) | |
download | libvirt-python-7f842365b192a514be30512c4f96abdbef9702a0.tar.gz |
Fix use of virDomainEventRegister in python bindings
If an app used the virDomainEventRegister binding instead
of the virDomainEventRegisterAny binding, it would never
have its callback invoked. This is because the code for
dispatching from the C libvirt_virConnectDomainEventCallback
method was totally fubar.
If DEBUG macro was set in the python build the error would
become visible
"libvirt_virConnectDomainEventCallback dom_class is not a class!"
The code in libvirt_virConnectDomainEventCallback was
inexplicably complex and has apparently never worked. The
fix is to write it the same way as the other callback handlers.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'libvirt-override-virConnect.py')
-rw-r--r-- | libvirt-override-virConnect.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libvirt-override-virConnect.py b/libvirt-override-virConnect.py index 23fadfd..0beaf9c 100644 --- a/libvirt-override-virConnect.py +++ b/libvirt-override-virConnect.py @@ -38,7 +38,7 @@ """ try: for cb,opaque in self.domainEventCallbacks.items(): - cb(self,dom,event,detail,opaque) + cb(self, virDomain(self, _obj=dom), event, detail, opaque) return 0 except AttributeError: pass |