Merge
This commit is contained in:
parent
d2cc475095
commit
8499e97a00
@ -537,6 +537,7 @@ class MostlyReliablePipe(object):
|
||||
return False
|
||||
|
||||
def _retransmit_check_worker(self):
|
||||
try:
|
||||
now = time.time()
|
||||
for key in self._incoming.keys()[:]:
|
||||
message = self._incoming[key]
|
||||
@ -551,6 +552,8 @@ class MostlyReliablePipe(object):
|
||||
self._dispatched[key] = message
|
||||
message.set_dispatch_time()
|
||||
del self._incoming[key]
|
||||
except KeyboardInterrupt:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _process_incoming_data(self, segment):
|
||||
|
@ -60,7 +60,14 @@ class PresenceDiscovery(object):
|
||||
|
||||
# print "Browsing domain '%s' on %i.%i ..." % (domain, interface, protocol)
|
||||
|
||||
try:
|
||||
b = dbus.Interface(self.bus.get_object(avahi.DBUS_NAME, self.server.ServiceTypeBrowserNew(interface, protocol, domain, dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_TYPE_BROWSER)
|
||||
except dbus.DBusException, exc:
|
||||
str_exc = str(exc)
|
||||
if str_exc.find("The name org.freedesktop.Avahi was not provided by any .service files") >= 0:
|
||||
raise Exception("Avahi does not appear to be running. '%s'" % str_exc)
|
||||
else:
|
||||
raise exc
|
||||
b.connect_to_signal('ItemNew', self.new_service_type)
|
||||
|
||||
self._service_type_browsers[(interface, protocol, domain)] = b
|
||||
|
@ -38,4 +38,7 @@ def start(console):
|
||||
args.append('--console')
|
||||
os.spawnvp(os.P_NOWAIT, 'python', args)
|
||||
|
||||
try:
|
||||
gtk.main()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user