]> git.meshlink.io Git - catta/commitdiff
* Fix dbus.glib import in dbus-test.py for dbus 0.35
authorTrent Lloyd <lathiat@bur.st>
Wed, 27 Jul 2005 22:22:21 +0000 (22:22 +0000)
committerTrent Lloyd <lathiat@bur.st>
Wed, 27 Jul 2005 22:22:21 +0000 (22:22 +0000)
 * Use glib mainloop directly instead of gtk so a DISPLAY is not needed.

git-svn-id: file:///home/lennart/svn/public/avahi/trunk@176 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-daemon/dbus-test.py

index bdfae0cca4f9dd52772949027781cf7420182442..cd708c0ade6c20e3dda1006c5eb0b9fed68c2ffd 100755 (executable)
@@ -1,8 +1,9 @@
 #!/usr/bin/python2.4
 
 import dbus
-import dbus.glib
-import gtk
+import gobject
+try: import dbus.glib
+except ImportError, e: pass
 
 from time import sleep
 
@@ -38,7 +39,7 @@ g.AddAddress(0, 0, "foo.local", "47.11.8.15")
 g.Commit()
 
 try:
-    gtk.main()
+    gobject.MainLoop().run()
 except KeyboardInterrupt, k:
     pass