Bazaar/Avahi mDNS Plugin

Klaus Hartke klaus.hartke at googlemail.com
Sat Apr 7 01:13:20 BST 2007


John Arbash Meinel wrote:
> > If I just do:
> > 
> > $ python -c "import dbus.mainloop.glib"
> > 
> > I get the same error (on Edgy).
> > 
> > I found this page:
> > http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html

Great source! I applied the changes below to share.py following the
"Backwards compatibility: dbus.glib" section of that page and now it
works!

The screenshot at
http://www.informatik.uni-bremen.de/~hartke/bzr/bonjour-locations.png
has been updated and now shows two true bzr locations on my network.

Regards,
Klaus


=== modified file 'share.py'
--- share.py    2007-03-27 06:11:43 +0000
+++ share.py    2007-04-06 21:10:12 +0000
@@ -21,7 +21,7 @@

 import avahi
 import dbus
-import dbus.mainloop.glib
+import dbus.glib
 import gobject

 from bzrlib import bzrdir, errors, trace, urlutils
@@ -126,7 +126,6 @@
     def initializeMainLoop(self):
         """Initialise the glib main loop, and connect to system bus."""
         gobject.threads_init()
-        dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
         self.main = gobject.MainLoop()

     def findBranches(self):





More information about the bazaar mailing list