Re: [libvirt] [libvirt-glib] Adjust example to pygobject-3.0

Hi, attached patch makes the example work again with recent pygobject-3.0 which doesn't allow to "import gtk" anymore. Cheers, -- Guido On Thu, Nov 17, 2011 at 10:36:23PM +0100, Guido Günther wrote:
--- examples/event-test.py | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/examples/event-test.py b/examples/event-test.py index 33e7c73..4b06235 100644 --- a/examples/event-test.py +++ b/examples/event-test.py @@ -1,5 +1,5 @@
-import gtk +from gi.repository import Gtk import libvirt import getopt import sys @@ -47,16 +47,15 @@ def main():
print "Using uri:" + uri
- LibvirtGLib.init("") + LibvirtGLib.init(0, "") LibvirtGLib.event_register() -# libvirtglib.eventRegister() vc = libvirt.open(uri)
#Add 2 callbacks to prove this works with more than just one vc.domainEventRegister(myDomainEventCallback1,None) vc.domainEventRegister(myDomainEventCallback2,None)
- gtk.main() + Gtk.main()
if __name__ == "__main__": main() -- 1.7.7.1

On Thu, Nov 17, 2011 at 10:38:01PM +0100, Guido Günther wrote:
Hi, attached patch makes the example work again with recent pygobject-3.0 which doesn't allow to "import gtk" anymore. Cheers,
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Fri, Nov 18, 2011 at 10:00:52AM +0000, Daniel P. Berrange wrote:
On Thu, Nov 17, 2011 at 10:38:01PM +0100, Guido Günther wrote:
Hi, attached patch makes the example work again with recent pygobject-3.0 which doesn't allow to "import gtk" anymore. Cheers,
ACK Pushed. Thanks, -- Guido
participants (2)
-
Daniel P. Berrange
-
Guido Günther