From 746c6982d06a124b05b439f11d92ae24fa252a40 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 21 Sep 2011 19:24:13 +0100 Subject: Make the regression tests work with D-Bus >= 1.5.6 The tests rely on being able to eavesdrop. Since D-Bus 1.5.6, normal match rules do not eavesdrop, even if allowed: you have to specifically ask for it. https://bugs.freedesktop.org/show_bug.cgi?id=41090 Reviewed-by: Will Thompson --- tests/twisted/servicetest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py index 36ff6683..bf22beb7 100644 --- a/tests/twisted/servicetest.py +++ b/tests/twisted/servicetest.py @@ -311,7 +311,14 @@ class IteratingEventQueue(BaseEventQueue): bus.add_message_filter(self._dbus_dev_null) return - bus.add_match_string("") # eavesdrop, like dbus-monitor does + try: + # for dbus > 1.5 + bus.add_match_string("eavesdrop=true") + except dbus.DBusException: + pass + + # for dbus 1.4 + bus.add_match_string("") bus.add_message_filter(self._dbus_filter_bound_method) -- cgit v1.2.1