From 60190192661bb53d24c002ffa4d2ff5bbf773e74 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Thu, 28 Apr 2011 12:48:14 +0100 Subject: saluttest: remove the NOC signal handler when finished with Signed-off-by: Jonny Lamb --- tests/twisted/saluttest.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/twisted/saluttest.py b/tests/twisted/saluttest.py index 9418f9fd..cc631156 100644 --- a/tests/twisted/saluttest.py +++ b/tests/twisted/saluttest.py @@ -66,10 +66,10 @@ def ensure_avahi_is_running(): def name_owner_changed_cb(name, old_owner, new_owner): loop.quit() - bus.add_signal_receiver(name_owner_changed_cb, - signal_name='NameOwnerChanged', - dbus_interface='org.freedesktop.DBus', - arg0='org.freedesktop.Avahi') + noc = bus.add_signal_receiver(name_owner_changed_cb, + signal_name='NameOwnerChanged', + dbus_interface='org.freedesktop.DBus', + arg0='org.freedesktop.Avahi') # Cannot use D-Bus activation because we have no way to pass to activated # clients the address of the system bus and we cannot host the service in @@ -81,6 +81,8 @@ def ensure_avahi_is_running(): loop.run() + noc.remove() + def exec_test_deferred (fun, params, protocol=None, timeout=None, make_conn=True): colourer = None -- cgit v1.2.1